Redirects
A redirect sends visitors from one address to another. If you moved a page, a redirect makes the old link keep working by sending people to the new one — and tells search engines about the move.
Redirects are the easiest kind of rule.
When to use a redirect
Section titled “When to use a redirect”- You moved or renamed a page and don’t want old links to break.
- You want
www.example.comandexample.comto land in the same place. - You want everyone on
http://to switch to the securehttps://. - You’re running a short link that should point somewhere else.
If you want the old address to keep working without the visitor’s address bar changing, that’s a rewrite, not a redirect.
Create a redirect
Section titled “Create a redirect”- Go to Rules → Add Rule → Redirect.
- Set the When — which addresses to match, for example
/old-page. - Set the Then — where to send the visitor. A full URL
(
https://example.com/new-page) or a path within the site. - Pick the redirect type (below).
- Save.
Temporary vs. permanent
Section titled “Temporary vs. permanent”| Type | Code | Use it when |
|---|---|---|
| Temporary | 302 | The change is for now — a sale, maintenance, an experiment. Also the right choice while testing. |
| Permanent | 301 | The address has moved for good. Search engines update their links. |
| Temporary, keep method | 307 | Like 302, but a POST stays a POST. For forms and APIs. |
| Permanent, keep method | 308 | Like 301, but a POST stays a POST. |
Keeping the path and query
Section titled “Keeping the path and query”Two switches decide what carries over to the destination:
- Keep the query string —
?utm_source=xis appended to the target. On by default; leave it on unless the destination shouldn’t see it. - Keep the path — the original path is appended to the target. This is what
turns one rule into a whole-site move:
example.com/*→newsite.com/*, each page landing on its counterpart.
Leave keep the path off when you’re sending everything to a single page.
Common examples
Section titled “Common examples”Force the secure site
http://→ the same address onhttps://, permanent.
Send
wwwto the plain domainwww.example.com→example.com, permanent, keep the path.
Old page to new page
/about-us→/about, permanent.
A note on www redirects
Section titled “A note on www redirects”A redirect between www and your plain domain only runs if requests for www
actually reach nsin — which means www needs a proxied DNS record. When you
create one of those two canonical redirects, nsin sets that record up for you and
tells you what it did. If it reports that a www record exists but isn’t
proxied, switch it to proxied or the redirect will never fire. See
Managing DNS Records.
Common questions
Section titled “Common questions”My redirect loops forever. The When and the Then point at each other. Make sure the destination doesn’t also match the condition — for example, exclude the target path from the rule.
I changed a redirect but still see the old behavior. Browsers remember permanent redirects. Test in a private window.
Two redirects both match. The one higher in the list wins. See Rules Overview.