Changing your domain or switching www without breaking links

The short answer
You change your domain, or switch between www.yourbusiness.com and yourbusiness.com, without breaking links by picking one address, making it serve the site first, and sending every old address to the same page on the new one with a permanent (301) redirect. Then you point canonicals, the sitemap and your internal links at the new address, tell Google, and fix the links you send out yourself in emails, forms and profiles, while the old domain stays registered and redirecting for at least a year.
This guide covers two jobs that use the same steps: a new domain name (a rebrand, a merger, a better .com) and a www switch on the same domain. It does not cover moving to a new platform; if you are doing that too, see the note in step 1, and our guide to a safe website move for launch week, DNS and rollback.
You need four things before you start: the login for wherever your domain's settings live, a list of every page address on your site today, access to Google Search Console, and one person who will set up the redirects.
- Pick one address and write it down. www or not, and the exact new domain.
- Make the new address serve the site before anything sends visitors there.
- 301 every old address to the same page on the new one. Never all to the home page.
- Update canonicals, the sitemap and internal links so the site only names its new address.
- Tell Google. The Change of Address tool for a new domain; redirects and canonicals alone for a www switch.
- Fix the links you send out: email signatures, form emails, profiles and print.
- Keep the old domain and the redirects for at least a year.
Which steps apply to you
A www switch is the smaller job. It stays on the same domain, Google says it does not need the Change of Address tool, and your email address does not change. A new domain name touches everything on the list.
Step | New domain name | www switch, same domain |
|---|---|---|
1. Pick one address | Yes | Yes |
2. New address serves the site first | Yes | Yes |
3. 301 every old address, page to page | Yes | Yes |
4. Canonicals, sitemap, internal links | Yes | Yes |
5. Search Console Change of Address | Yes | No – Google says not to use it for this |
6. Email, forms, profiles, print | Yes, every one | Only links that hard-code the old version |
7. Keep the old domain a year or more | Yes | Keep the redirect; there is nothing to renew |
1. Pick one address, and only change one thing
Decide the exact address the site will live at, written in full: https://yourbusiness.com or https://www.yourbusiness.com, on the old domain or a new one. Either version works. What matters is that one is the address and every other version forwards to it.
MDN, the web reference published by Mozilla, puts it plainly: "you need to choose one and stick with it. The choice of which one to have as your canonical location is yours" (MDN). "Canonical" here just means the official address.
Change the address and nothing else that week. If you are also moving platforms or redesigning, do those first, let them settle, and change the domain weeks later. Search traffic can wobble after any of these changes, and with one change at a time you know which one caused it.
2. Make the new address serve the site before anything points at it
The new address has to answer with your real site, over https:// with a working padlock, before you redirect anything to it. A redirect to an address that shows an error, a parked page or a certificate warning loses visitors on the spot.
- A new domain: register it, add it to your hosting, and wait until
https://newdomain.comshows your site. - A www switch: make sure both versions already answer. Most hosts set up both; the security certificate has to cover both too.
- Check from a phone on mobile data, not just your office computer, so you are not looking at a cached copy.
Leave the old address serving the site for now. It becomes the redirect in the next step.
3. 301 every old address to the same page on the new one
Set a permanent (301) redirect from every old address to the matching page on the new one, keeping the path: oldname.com/services/roofing/ goes to newname.com/services/roofing/, not to the new home page. For a domain change, a single rule at your host or DNS provider that keeps the path usually does it.
Why this decides your traffic is its own topic, covered in our guide to what a redirect is. The short version is that Google ties a page's history to its address, and a 301 tells Google the page moved for good.
Three rules from Google's own site-move guide (Google Search Central):
- Page to page. "Don't redirect many old URLs to one irrelevant single URL destination, such as the home page of the new site."
- One hop. "Avoid chaining redirects." If
http://www.oldname.com/pagewent tohttps://oldname.com/pageyears ago, it should now go straight to the new address, not through every old step. - Every variant. The old
http,https,wwwand bare versions all need the rule, not just the one you usually type.
Then test it. Take your list of old addresses, open a sample from each section of the site (pages, posts, images, PDFs) and confirm each one lands on its own page in one step.
4. Point canonicals, the sitemap and internal links at the new address
Once the redirects work, the site itself should only name its new address. Google's guide asks for a "self-referencing" canonical tag on each new page, says to "Change the internal links on the new site from the old URLs to the new URLs", and to make sure "your sitemaps are all updated with the new URLs" (Google Search Central).
Where the old address hides | What to check |
|---|---|
Canonical tag on each page | Points to the page's own new address |
XML sitemap | Lists only new addresses |
robots.txt | Its Sitemap line names the new address |
Links inside posts and pages | Go to the new address directly, not through a redirect |
Menus, footer, buttons | Same |
Social sharing image and page URLs | Use the new address |
Structured data (business details, logo) | Uses the new address |
On WordPress, the address lives in Settings > General, where the Site Address (URL) setting "is the address you want people to type in their browser". Changing it does not rewrite old links inside your posts: WordPress's own migration guide warns that "references to the old domain name or location will remain in the database", and that a careless search-and-replace across the whole database "can cause issues with data serialization" (WordPress developer docs). That job is for whoever looks after the site, with a backup taken first.
5. Tell Google, the right way for your change
For a new domain name, verify both the old and new domain in Google Search Console with the same Google account, then submit a Change of Address from the old one. Google says the tool "tells Google about your change, and helps to migrate your Google Search results" (Search Console Help). Submit the new sitemap in the new property the same day.
For a www switch, skip the tool. Google lists "Moving between www and non-www in the same domain" among the cases where you should not use it (Search Console Help); the redirects and canonicals from steps 3 and 4 tell Google everything it needs. The same goes for a switch from http to https.
Then expect some movement. Google says "the visibility of your content in Search may fluctuate temporarily during the move" and that "a site's rankings will settle down over time" (Google Search Central). Watch the pages that bring in leads, not the whole site, and judge after a few months, against numbers you wrote down before the change.
6. Fix the links you send out: email, forms, profiles and print
Redirects catch old links, but the links you keep sending out should use the new address from day one. These are the ones a domain change most often leaves behind, because they live outside the website:
- Email signatures for everyone, and any saved reply templates.
- Form emails. The confirmation a customer gets, and the notification you get, often link back to the site or send from an address on the old domain. Submit every form once and read both emails.
- Your email address itself. A new website domain does not have to change your email. If it does, that is its own project. Either way, keep the old domain's email settings (MX records) working, or messages to your old address bounce.
- Your newsletter tool, booking and payment links, and any automation that names the site.
- Your Google Business Profile, social profiles and directory listings.
- Ads and tracking. Ad destination URLs, analytics and tag settings.
- Print and QR codes. These will keep sending people to the old domain for years, which is the best reason of all to keep its redirects running.
7. Keep the old domain and the redirects for at least a year
Do not let the old domain expire, and do not remove the redirects once traffic moves. Google's site-move guide says to keep redirects "for as long as possible, generally at least 1 year" (Google Search Central), and Search Console Help recommends "continuing to pay for the old domain for at least a year" (Search Console Help).
Longer is better. Old links on other sites, in old emails and on printed cards do not update themselves, and a lapsed domain can be bought by someone else, along with every link that still points at it. Renewing a domain you no longer use costs far less than losing what it sends you.
If your site runs on EmDash: what Change domain does
EmDash, Cloudflare's open-source CMS built on Astro, has a Change domain dialog in Settings > General. Its guide says the dialog "checks that the new domain serves the site before it switches", so step 2 is built in: if the new address does not answer with your site yet, it tells you why and does not switch (EmDash docs).
Once it switches, the new Site URL is the address that "Links in emails and plugins, sitemaps, robots.txt, hreflang links, social image URLs, and canonical links set in the SEO panel use". In other words, most of step 4 updates in one place. Sign-in and invitation emails link to the new address right away. Browsers and shared caches can keep old sitemaps for up to an hour and robots.txt for up to a day.
Two things it does not do for you, both from the same guide:
- It does not redirect the old address. "The old address keeps serving the site until you remove it from your host. To send visitors from the old address to the new one, add a redirect at your host or DNS provider." Step 3 is still yours.
- It does not move your passkeys. "A passkey only works at the address where it was created." Before you retire the old address, sign in there, use the Continue on button to move your sign-in to the new address, and register a passkey there. Other users can sign in at the new address with an emailed link. The guide's caution: "make sure every administrator can sign in at the new address" first.
Only administrators can change the domain, and the Search Console and email-signature steps above still apply.
Who should wait, and who should stay on WordPress
If your site already lives at one address and every other version forwards to it, a www switch buys you nothing in search, so there is no reason to do it unless you want the shorter address on your cards. A new domain name is worth the work for a real rebrand. It is not a fix for falling traffic.
If you are weighing a platform move as well, the same honesty applies. Stores, members areas, online courses and sites built around one plugin feature such as booking or a directory are usually better left on WordPress for now, because moving them means rebuilding that feature. A site that works, costs little and nobody touches can stay where it is. Our website migration SEO checklist walks through who should move and what to check if you do.
How we handle your address on a move
We bring WordPress sites into the AI era on EmDash and Astro, the CMS its makers call "the spiritual successor to WordPress". Every URL, redirect, form, title, description and canonical is checked against your live site before anything changes, on a private preview, and nothing switches until you approve it.
On a site we host, your bare domain is the address, and every www address answers with one permanent redirect to the same page on it, path and all. If your site lives at www today, that is part of the move, so it is in the page-by-page check rather than a surprise afterward. After launch, the monthly certificate lists the checks we ran and what changed.
A free, read-only check of your public pages shows whether your site is a good fit and gives you the exact price before you ask, with every option listed under pricing. To see where your site stands first, check your site for free.
Frequently asked questions
Will changing my domain name hurt my SEO?
It can cause a dip, but it does not have to lose what you have built. Rankings follow the redirects: if every old address forwards to the same page on the new domain and Google is told through Search Console, the history moves with it. Google says visibility may fluctuate during the move and settles over time.
Is www or non-www better for SEO?
Neither is right for everyone, and MDN says the choice is yours. What matters is choosing one as the official address and sending the other to it with a permanent redirect, so search engines see one site instead of two copies. Pick the version you already use unless you have a reason to change, and use it everywhere.
Do I need the Change of Address tool to switch to www or non-www?
No. Google says not to use it for moving between www and non-www on the same domain, or for switching from http to https. Use page-to-page 301 redirects and canonical tags that name the new version instead. The tool is for moving to a different domain.
How long should I keep my old domain after a domain change?
At least a year, and longer if it still gets visits. Google advises keeping redirects for at least a year and continuing to pay for the old domain for at least a year. Old links on other sites, in emails and on printed materials keep working only while the old domain redirects.
Should I redirect my old domain to the new home page?
No. Send each old address to the same page on the new domain, keeping the path. Google warns against redirecting many old URLs to one destination such as the home page. A visitor who clicked an old link to your services page should land on your services page.
Does changing my website domain change my email address?
Not unless you want it to. Your website and email can use different domains. If you do move email to the new domain, treat it as a separate project, and keep the old domain's email settings working so messages sent to your old address still arrive.
Will my passkey still work after I change my domain on EmDash?
No. EmDash says a passkey only works at the address where it was created. Before retiring the old address, sign in there, use the Continue on button in Settings to move your sign-in to the new address, and register a new passkey there. Make sure every administrator can sign in first.