Renamed a page? Old links can now find the new one
Rename about-us.html to about.html and every link to the old address breaks: the ones in Google, in old social
posts, on other people's websites. Visitors land on "not found", and the search ranking the old page earned goes
nowhere.
Now you can send them on. Pagehaus sites can have redirects, on every plan.
One click from your broken links
Your site's Analytics tab lists addresses visitors followed a link to but that don't exist. Next to each one there's now Redirect this address…. Pick the page that replaced it, and that's it: the next visitor following the old link lands on the new page.
Or write them yourself
Behind that button is a plain text file named _redirects at the top of your site, one rule per line: the old address,
then the new one.
/about-us /about.html
/blog/* /posts/:splat
/news/:year/:slug /posts/:year-:slug.html
/old-pricing /pricing.html 302
- A rule is a 301 (moved for good) unless it says 302 (moved for now). A 301 tells search engines the page moved, so its ranking moves with it.
*matches the rest of an address, and:splatputs it in the new one, so one line can move a whole section.- Matching ignores capital letters and a slash at the end, because old links come spelled every way.
- It's the same format Netlify and Cloudflare Pages use, so a
_redirectsfile you already have works here too.
It can't break a working page
A rule only applies where there's nothing else: no file at that address. If the page is still there, visitors see the page. A typo in your rules can't take a working page offline, and to redirect an address you remove what's there.
Lines that can't be read are skipped, and your site's Files tab tells you which and why. If you work on your own
computer, pagehaus serve follows your rules as Pagehaus does, and pagehaus check points out mistakes and rules that
go round in a circle.
Moving a site to Pagehaus
This is what redirects are really for. Moving from WordPress, Wix or another host usually changes your addresses, and redirects keep the old ones working. We're writing a full guide to moving a site without losing your search rankings; until then, the help page has the steps.
Redirects to other websites (sending /shop to your shop, say) are on the Personal and Pro plans.
— Ademar