How to Redirect a Subdomain: Step-by-Step Guide

Michel Bardelmeijer is Tech Lead and Sales at redirect.pizza, where he helps DevOps and IT teams solve domain redirect challenges at scale. Michel has guided organizations like SD Worx, Zurich Airport and Harvard through complex redirect scenarios involving thousands of domains.
Have questions about bulk redirects, HTTPS migrations, or domain consolidations? Connect with Michel on LinkedIn or reach out to the redirect.pizza team.
A subdomain redirect sends traffic from one subdomain (like blog.example.com) to a different URL. You might consolidate a blog subdomain into your main site, point a legacy app subdomain to a new platform, or redirect www to your apex domain.
This guide covers the main methods for setting up subdomain redirects, including DNS-level configuration, CMS tools, and server-side rules. Each method has trade-offs around control, SSL handling, and maintenance. We also cover how redirect.pizza handles subdomain redirects without touching your hosting stack.

Key Takeaways
- A subdomain redirect forwards traffic from a subdomain (like shop.example.com) to any other URL, preserving SEO value when you use a 301 permanent redirect
- DNS providers, CMS platforms, and server config files (.htaccess) can all handle subdomain redirects, but each has limitations around SSL, propagation time, and scalability
- HTTPS complicates subdomain redirects because the source subdomain needs its own valid SSL certificate before the redirect can fire
- If you need to redirect all subdomains at once (like *.example.com), that requires a wildcard redirect, not a standard subdomain redirect
- redirect.pizza handles subdomain redirects at the DNS level with automatic SSL provisioning, so you do not need to configure certificates or manage server rules
What is a subdomain redirect?
A subdomain is a prefix added to your main domain that functions as a separate address. Common examples: blog.example.com, shop.example.com, app.example.com. Each subdomain can point to different content or services.
A subdomain redirect sends traffic from a subdomain to a different URL. The destination can be another subdomain, a directory on your main domain, or an entirely different domain. For example:
- Subdomain to directory: blog.example.com to www.example.com/blog
- Subdomain to subdomain: shop.example.com to store.example.com
- Subdomain to different domain: help.example.com to support.newbrand.com
- Directory to subdomain: www.example.com/blog to blog.example.com
A related but different scenario is redirecting between the www subdomain and the apex (root) domain, like redirecting www.example.com to example.com or the other way around. That is covered in detail in our guide on how to redirect non-www to www.
Why would you redirect a subdomain?
The most common reason is domain consolidation. When you move content from a subdomain (like blog.example.com) back to your main domain (www.example.com/blog), a 301 redirect makes sure existing links and bookmarks still work.
There is also an SEO argument. Search engines treat subdomains as partially separate entities. Backlinks pointing to blog.example.com do not fully strengthen www.example.com. Redirecting the subdomain to the main domain consolidates that link equity. For more on how redirects affect search rankings, see our guide on keeping SEO intact during redirects.
Other common scenarios include rebranding (old-product.example.com to new-product.example.com), sunsetting services (beta.example.com to the main site), and consolidating regional subdomains after a domain migration.
www to non-www (and vice versa)
Most websites are accessible at both www.example.com and example.com. Without a redirect between the two, search engines see duplicate versions of every page, which dilutes ranking signals. Redirecting one version to the other is a basic best practice. We have a dedicated guide for this: how to redirect non-www to www (and the reverse).

Ways to redirect a subdomain
There are three main approaches to subdomain redirects: DNS-level configuration, CMS-based redirects, and server-side rules. Each works differently and has different trade-offs.
Option 1: Via your DNS provider
Some DNS providers support URL forwarding or redirect records directly in their control panel. The exact setup varies by provider:
Namecheap offers URL Redirect Records in the Advanced DNS tab. You can forward subdomains to different URLs or IP addresses. See Namecheap's redirect guide.
AWS Route 53 uses A or CNAME records combined with an S3 bucket or CloudFront distribution to handle subdomain redirects. Learn more in the Route 53 documentation.
Cloudflare handles subdomain redirects through Page Rules or Redirect Rules, combined with DNS records. This requires the subdomain to be proxied through Cloudflare.
GoDaddy supports subdomain forwarding through its DNS management interface. See GoDaddy's guide on domain forwarding.
Option 2: Via your CMS
If your CMS is connected to the subdomain, you can configure redirects from within the platform. This approach ties the redirect to your hosting stack.
WordPress supports subdomain redirects through plugins (like Redirection) or by connecting subdomains in the domain settings.
Webflow allows subdomain redirects in project settings. See Webflow's subdomain guide.
Wix provides a URL Redirect Manager under SEO Tools. Learn more about connecting a subdomain in Wix.
Option 3: Server-side rules (.htaccess or cPanel)
cPanel has a built-in Redirects feature under the Domains section. You select the subdomain, choose 301 or 302, and enter the destination URL. See the cPanel redirect docs.
.htaccess (Apache servers only) lets you write RewriteRules to redirect subdomains. This gives you the most control but requires familiarity with regex and Apache configuration. Mistakes in .htaccess can cause site downtime.
Comparing the methods
| Factor | DNS provider | CMS | Server rules | redirect.pizza |
|---|---|---|---|---|
| Setup difficulty | Medium | Low | High | Low |
| SSL/HTTPS handling | Manual | Depends on host | Manual | Automatic |
| Propagation time | Up to 48 hours | Immediate | Immediate | Minutes (after DNS) |
| Works without hosting | No | No | No | Yes |
| Bulk redirects | Limited | Plugin-dependent | Manual per rule | CSV import |
| Analytics | No | No | No | Built-in |
| 301/302 control | Limited | Plugin-dependent | Full | Full |
HTTPS and subdomain redirects
One issue that trips people up: if your subdomain uses HTTPS (and it should), the source subdomain needs a valid SSL certificate before the redirect can fire. Without it, visitors see a browser security warning instead of being redirected. Most DNS providers and CMS platforms require you to provision this certificate yourself. redirect.pizza handles this automatically through Let's Encrypt SSL provisioning, so the redirect works over HTTPS from the start. For more on why HTTPS redirects can fail, see our guide on why HTTPS redirects break.
"The biggest mistake I see with subdomain redirects is people forgetting about SSL. They set up the DNS record, the redirect logic is correct, but the browser blocks it because there is no valid certificate on the source subdomain. That is exactly the kind of thing a DNS-based redirect service handles for you."
– Michel Bardelmeijer, Tech Lead at redirect.pizza
Why use redirect.pizza for subdomain redirects
The comparison above shows the core trade-off: DNS providers, CMS platforms, and server rules all require you to manage SSL certificates, hosting configuration, or both. redirect.pizza operates at the DNS level without requiring a hosting stack, and provisions SSL certificates automatically.
redirect.pizza offers advanced redirect options, with a high level of control. You can use any type of redirect you like. And make use of complex redirect rules and path forwarding. redirect.pizza also supports a broad range of destination variables.
redirect.pizza also comes with a feature for broken destination monitoring. Broken destination monitoring ensures the destination is reachable.
redirect.pizza comes with automatic HTTPS, meaning automatic renewal of SSL certificates, keeping your security up to date at all times.
The service of redirect.pizza comes with an easy-to-use interface. On top of that, the extensive analytic tool keeps track of all kinds of data, such as location, device, referrer, and requested pages of your visitors.
redirect.pizza offers automatic DNS, the easiest way to manage your redirecting needs from a single platform. And with our bulk function, you can easily apply automatic DNS on multiple hosts or domains in one go.
redirect.pizza provides the fastest redirects possible, with guaranteed responsiveness. This is done through our high-performance edge network, minimizing latency, and enhancing the overall user experience.
How to redirect a subdomain using redirect.pizza
Setting up a subdomain redirect with redirect.pizza takes a few minutes. Here is the process:
- 1
Step 1: Create a redirect.pizza account
Create a redirect.pizza account. Once you've created the free account, you can access our redirect features.

- 2
Step 2: Create redirect
After signing up, click on "create a redirect" to get started. In the create a redirect window, enter the source URL (such as the subdomain) and the destination URL (where the subdomain will be redirected to). Learn more in our getting started guide.
- 3
Step 3: Adjust DNS settings
The required DNS change pops up. Go to your domain registrar to make this DNS change for the A record. Alternatively, you can use our Automatic DNS feature to make these changes. It may take up to 24 hours for the DNS changes to propagate.
- 4
Step 4: Test your redirect and keep track of your analytics
Type your (old) source URL in the address bar of your browser and click "enter". Are you redirected to the destination URL? Then the redirect is working! You can keep track of your redirect using the Redirect Analytics window. Are you experiencing issues? Check out our redirect troubleshooting guide.
Frequently Asked Questions
Yes. A subdomain redirect can point to any URL, including a completely different domain. For example, you can redirect shop.example.com to store.newbrand.com. If you use a 301 redirect, search engines will transfer ranking signals to the new destination. redirect.pizza supports cross-domain subdomain redirects with automatic HTTPS.
In GoDaddy, go to your DNS management interface and use the domain forwarding feature. Select the subdomain you want to redirect, enter the destination URL, and choose between a 301 (permanent) or 302 (temporary) redirect. DNS changes can take up to 48 hours to propagate. For more control over redirect types and HTTPS handling, you can use a dedicated redirect service like redirect.pizza instead.
A subdomain redirect forwards one specific subdomain (like blog.example.com) to a destination URL. A wildcard redirect forwards all subdomains (*.example.com) to a destination, including subdomains that do not exist yet. Wildcard redirects are useful when you need to catch traffic to any subdomain without configuring each one individually. Learn more in our guide on wildcard subdomains.
That depends on the method. CMS-based and server-side redirects work immediately once configured. DNS-based redirects depend on DNS propagation, which can take anywhere from a few minutes to 48 hours. redirect.pizza redirects become active within minutes after you update the DNS A record, and the service handles SSL provisioning automatically in the background.



