Dev.to WebDev 🛠 Dev 👁 2 📖 5 min read

Moving a blog from a subdomain to a directory (blog.example.com to example.com/blog)? A 12-point SEO checklist

Automated technical SEO checks that catch indexing blocks and deploy regressions — seotto.com Moving blog.example.com to example.com/blog is often sold as "just a path change, we'll 301 it". Search engines treat a subd

Automated technical SEO checks that catch indexing blocks and deploy regressions — seotto.com

Moving blog.example.com to example.com/blog is often sold as "just a path change, we'll 301 it". Search engines treat a subdomain as a separate site more than they treat a subdirectory. You will need redirects, a new (or additional) Search Console property, new sitemaps, and a period where both hosts are correct. This is the checklist I want on that project.

Before the move

1. Inventory every URL on the blog host. Posts, tags, authors, pagination, feeds, images, PDFs, the homepage, and any accidental www.blog or HTTP variants. Sitemap + a crawl + Search Console top pages. This is the map you will 301 from.

2. Decide the exact destination pattern, including trailing slashes. blog.example.com/post-slug → example.com/blog/post-slug/ (or without the slash, but pick one). Write examples for the homepage, a post, a tag, a page, an image, and the feed. A mismatch here becomes a chain or a loop later.

3. Make sure the main site can host the blog at that path: the reverse proxy, the CMS mount, or the static export, including assets. A move that 301s into a 404 is a downgrade. Test on a preview host (staging.example.com/blog/...) first, including CSS, images and the feed.

4. Prepare Search Console and analytics. You will need the example.com property (domain property, or a URL-prefix property that covers /blog). If you only had blog.example.com, add and verify the apex (or domain) property before the move, and have a change-of-address plan if you use one. Don't turn off the old property on day one; you will want its data.

5. Freeze other migrations. Do not also change CMS, typography, URL slugs, and HTTP-to-HTTPS rules in the same window if you can help it. You want the variable to be the host and the prefix, not everything at once.

During the move

6. 301 every old URL to its new URL, in one hop, preserving query strings. Including the blog homepage, pagination, tags, and file URLs you still serve. The old host should exist only as a redirector for a long time, not as a second copy of the content.

7. Change canonicals, hreflang, internal links, and the sitemap on the new URLs in the same deploy. If the new pages canonicalise to blog.example.com, or the new sitemap still lists the subdomain, the move will not finish. Internal links on the main site (nav, footer, homepage modules, product docs) should point at /blog/... now, not at the old host "because the 301 will handle it".

8. Move or proxy the feed. /feed.xml or /blog/feed.xml should work, and the old feed URL should 301. Readers, and some tools, will keep the old address for years. Update robots.txt on both hosts: the old host can stay almost empty (just a sitemap of redirects is unnecessary); the main host's robots.txt should list the new blog sitemap.

The dangerous state is two live copies, or a 301 into a page that still points back at the subdomain via canonical or nav. seotto.com checks canonicals, sitemaps and indexing signals after you ship, so a move that left the old host in a canonical, or a sitemap that still listed blog.example.com, gets caught as a regression.

9. Verify from the public internet: curl -sSI a post on the old host (one 301, Location is the new URL), then the new URL (200, canonical is itself, no stray noindex). Repeat for the homepage, a tag, an image, and the feed. Then try an old URL in Search Console's inspector once the property is ready.

After the move

10. Submit the new sitemap and watch coverage on both properties. Expect a messy few weeks: the old URLs will show up as redirects, the new ones will be discovered and indexed. What you do not want is a mass of 404s, or new URLs excluded by noindex or "Google chose a different canonical" pointing back at the subdomain.

11. Update the links you control. Homepage, product UI, emails, newsletters, social bios, ads, partner posts you can still edit. Leave the 301s in place even after you have updated them. Subdomain links live in other people's articles for years.

12. Keep the old host's certificates and 301s alive. Do not let blog.example.com expire or drop HTTPS; a certificate error on an old link is worse than a redirect. Revisit the setup at 6 and 12 months, but treat the redirector as part of the main site's infrastructure, not a temporary box you can forget.

A few traps that are specific to this move

  • Cookies and analytics. A subdomain had its own cookies; /blog is now first-party with the main site. Check that you have not accidentally noindexed /blog with a global marketing-site rule, or applied a global X-Robots-Tag from the main site that the blog never had.
  • Auth or language gates on the main site that the blog subdomain never had. Googlebot should still see the posts.
  • www vs apex. blog.example.com → www.example.com/blog vs example.com/blog should be one hop to the chosen canonical host, not two or three.
  • Image hosts. If images were blog.example.com/wp-content/..., they need redirects too, or HTML that already points at the new origin on day one.

This is a migration. The 301 is necessary and not sufficient; the annotations and the sitemap have to agree with the new home, on the day you flip.

Related reading

If you have moved a blog off a subdomain, how long did you keep the old host around as a redirector, and what still pointed at it six months later?

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.