Redirects

When you move documentation to Capable Sites from another platform, people and search engines still have the old links. Redirects send each old address to the page that replaced it, so nothing breaks.

Redirects have their own card in the site's Settings. Admins and collaborators can both edit them, and changes publish with your next Update and Promote.


#Where to find it

Open your site, choose Settings, then the Redirects card. The card shows how many rules you have, or No redirects. Redirects used to sit at the bottom of Spaces & URLs, which only admins can change. They moved to their own page so collaborators can look after them.

Feature

Who sets it up

Redirect rules

Confluence admins and site collaborators

Redirects after a page rename or slug change

Automatic, on the next deploy

Space address without a trailing slash

Automatic, on the next deploy


#Two ways to edit

View

How it works

Rules (the default)

Select Add redirect for a new row. Type the old path on the left, the new path on the right, and choose 301 permanent or 302 temporary. The bin icon removes a row. A row missing either path shows Incomplete. This rule is not saved until both paths are set.

Text

Select Edit as text to see every rule as plain text, one per line. Use it to paste hundreds of rules from a spreadsheet during a migration. Edit as rules switches back.

In the rules view, comments and lines it does not recognise stay as editable text rows, exactly as you typed them. Lines it does not recognise are marked Unrecognised rule format, kept as-is.


#Rule format

Line

What it does

literal /old-page /docs/new-page permanent

A permanent (301) redirect. This is what the rules view writes.

literal /beta /docs/whats-new temporary

A temporary (302) redirect.

/old-page /docs/new-page 301

The short form. Use 302 for temporary. Leave the code off and it is permanent.

# Redirects from the old help centre

A comment. Ignored when the site is built.

# Old help centre articles
literal /en/articles/123 /docs/getting-started permanent
literal /en/articles/456 /docs/billing permanent

# Short form also works
/old-pricing /docs/plans 301

Both paths start with /. The new path is where the page lives on your site: the space slug, then the page slug, such as /docs/getting-started. The Page metadata panel shows a page's address under More details.


#How long the rules can be

All your rules together can be up to 100,000 characters, roughly 1,300 rules. Go past that and the rule count turns red and shows how far over you are, for example (104,212 of 100,000 characters, too long to save). Save changes stays greyed out with Redirect rules are too long to save until you trim them.


#How a redirect works

A published site is a set of static files, so each rule becomes a small forwarding page at the old address. It sends the visitor on straight away and names the new address as the canonical one. Search engines treat that as a permanent move.

Because every rule publishes the same kind of forwarding page, 301 and 302 rules behave the same for visitors and search engines today. Pick the one that describes your intent.


#A few things that catch people out

  • Redirects publish on the next deploy. Saving alone changes nothing on the live site, so run Update and then Promote.

  • A rule that points a path at itself is skipped.

  • Changing a page's slug, or renaming a page so its address changes, already adds a redirect from the old address. You do not need a rule for that.

  • Changing a space's slug does not. Add rules for the old space addresses if people link to them.

  • A rule for /docs wins over the built-in forwarding from /docs to /docs/.



Old links, new pages, nothing broken.