Links & Site Architecture · FREE SEO UTILITY

Subdomain-to-Subfolder 301 Consolidation Planner (Nginx & Cloudflare).

Consolidate blog.domain.com into domain.com/blog/ safely: generate exact path-preserving Nginx and Cloudflare 301 redirect rules.

# Nginx Server Block (blog.yourwebsite.co.il -> https://yourwebsite.co.il/blog)
server {
  listen 443 ssl http2;
  server_name blog.yourwebsite.co.il;
  return 301 https://yourwebsite.co.il/blog$request_uri;
}

# Cloudflare Redirect Rule Expression
(http.host eq "blog.yourwebsite.co.il") -> Dynamic 301: concat("https://yourwebsite.co.il/blog", http.request.uri.path)

How to use this in your SEO workflow

  • Moving an isolated blog or docs subdomain into a root subfolder consolidates link equity onto your primary commercial domain.
  • Preserve identical URL slugs where possible so edge wildcard 301s route cleanly in 1 hop.
  • Keep both the old subdomain and root domain verified in Google Search Console for at least 180 days.
Verify URL-by-URL mappings in Site Migration
More utilities in this category:

Related in-depth SEO guides

SEO Academy