Skip to content
MocklyDocs

Run

Redirects

Send old addresses, short links, and moved sections on, with 301 and 302 rules.

A redirect sends an address with no page on to another one: a page you renamed, an old URL that's still linked from elsewhere, a short link for a campaign, or a whole blog that moved. Visitors and search engines follow it, and the query in the address goes along.

Adding redirects#

Open Site settings in the editor's sidebar, and under Redirects, click Add a redirect…. Each rule has:

  • From, the old address, from the site's root: /team, /About.html, /go/webinar. Capitals count, and a trailing slash doesn't: /team/ is /team. A whole URL works too, https://old.example.com/team, and only its path is used.
  • To, where it goes: a page of the site's, /about, or another site's address, https://zoom.us/webinar/register/…. A page's address can have a query and a # part of its own.
  • Type: Permanent (301), for an address that has moved for good, so search engines move to the new one; or Temporary (302), for a link whose page changes, such as a campaign's.

A rule saves as soon as its From and To are in, when you press Enter or leave a field, and reaches the live site with your next publish. Each version keeps its redirects, so History shows when they changed, and restoring a version brings them back. To remove one, open its ⋯ menu.

Everything under a path#

End a From in /* to match everything under it, the path itself too. End the To in /* as well, and what was matched goes on the end:

FromToSends
/blog/*/news/*/blog/2024/launch to /news/2024/launch, and /blog to /news
/docs/*https://docs.example.com/*every docs page to the same page on another site
/2019/*/archiveeverything from 2019 to one page
/*https://new.example.com/*every address with no page to the new site

An exact From wins over a wildcard, and among wildcards the one with the longest path wins, so /blog/2019/* can send old posts somewhere else than /blog/* sends the rest. The order you list them in doesn't matter.

Pages win#

A redirect only answers for an address with no page or file at it. A page you publish at /team shows, whatever a rule from /team says, so a rule you forgot about can never hide a page. The studio says so beside a rule whose From is a page or a file: it never runs while that page is there. To send a page's address elsewhere, delete or rename the page.

Pasting a list#

Moving a site often means many redirects at once. In the Redirects dialog, click Paste a list, and paste a rule a line: the old address, the new one, and 302 if it's temporary, between spaces, tabs, or commas.

Text
/old-page /new-page/go/webinar https://zoom.us/webinar/register/WN_abc 302/blog/* /news/*

Columns copied from a spreadsheet work too, and a header line such as From To is skipped. A line whose From the site has changes that rule. Each line that can't be read says why, and Add adds the rest. Copy as a list copies the site's redirects in the same form.

What a rule can't be#

  • A loop. A rule that sends an address to itself, a wildcard whose To is under its own From, or rules that send each other round (/a to /b, and /b to /a) are refused, saying which.
  • The home page, /, which is always a page, and /robots.txt and /sitemap.xml, which every publish makes.
  • A query in the From. A redirect matches the path, and passes the visitor's query on to the To, unless the To has a query of its own.

A site can have up to 1,000 redirects. They answer on the published site only, not in the editor's preview.