Why use a domain redirect?
56% of users refuse to submit a form on a site without HTTPS (source: GlobalSign, 2024). A domain without a TLS certificate displays a security warning in Chrome, Firefox, and Safari. Visitors leave the page before the redirect even executes. According to Google, a properly configured 301 redirect transfers 100% of the SEO ranking to the destination.
CaptainDNS provides a domain redirect service with automatic HTTPS. TLS certificates are issued via Let's Encrypt in under 60 seconds. You choose the destination and forwarding options. We handle the certificate, renewal, and routing.
Typical use cases
- Subdomain migration: consolidate
blog.captaindns.comtocaptaindns.com/blogwith a 301 to transfer SEO ranking. - Apex to www: redirect
captaindns.comtowww.captaindns.comwhen your hosting provider does not support root domains. - Multi-subdomain consolidation: merge
shop.captaindns.com,docs.captaindns.com, andhelp.captaindns.comintocaptaindns.comto concentrate SEO authority on a single host. - Typo domains: protect your brand by redirecting misspelled variants to the main domain.
- Temporary campaigns: redirect
promo.captaindns.comto a landing page with a 302. Disable in one click when the campaign ends.
How to set up a redirect in 3 steps
1. Add the source domain
Sign in to CaptainDNS and navigate to the Redirect Hosting section. Enter the domain or subdomain to redirect (for example blog.captaindns.com). CaptainDNS automatically extracts the root domain for ownership verification.
2. Verify domain ownership
CaptainDNS generates a unique TXT record to add to your DNS zone. Add it at your registrar or DNS provider, then click "Verify".
If the root domain is already verified through another CaptainDNS service (MTA-STS Hosting, BIMI Hosting), this step is automatically skipped. Verification is shared across all services.
3. Configure the destination and DNS
Set your redirect parameters:
- Destination URL: the address to redirect to (e.g.
https://captaindns.com) - Redirect type: 301 (permanent) or 302 (temporary)
- Path forwarding: preserve the URL path during redirection
- Parameter forwarding: preserve query strings (?utm_source=...) during redirection
Then configure the DNS records provided by CaptainDNS at your registrar. The TLS certificate is issued automatically once DNS points to our servers.
What is an HTTP redirect?
An HTTP redirect is a server response that tells the browser to go to a different address. The server responds with a 3xx status code and a Location header containing the destination URL. The browser automatically follows this instruction. This behavior is defined in RFC 7231, Section 6.4.
301 and 302 redirect codes
| Feature | 301 redirect | 302 redirect |
|---|---|---|
| Name | Moved Permanently | Found (Temporary) |
| Duration | Permanent | Temporary |
| Browser caching | Yes, the browser memorizes it | No, checked on every visit |
| SEO transfer | Google transfers authority | Google keeps the source URL |
| Google indexing | Google indexes the destination | Google indexes the source |
| Use case | Domain migration, URL change | Temporary campaign, A/B test |
Google also recommends code 308 (Permanent Redirect, RFC 7238) for permanent redirects that preserve the HTTP method.
SEO impact of redirects
Google recommends the 301 redirect for every domain migration. Concrete effects on search rankings:
- 301 permanent: Google transfers PageRank, backlinks, and domain authority to the destination. The old domain disappears from search results in roughly 4 to 8 weeks.
- 302 temporary: Google continues indexing the source URL. No SEO authority is transferred. Suitable when you plan to reactivate the source URL.
- Redirect chains: each intermediate hop reduces the PageRank passed along. Stay under 2 hops to preserve over 90% of the signal.
HTTP request/response example
When a visitor accesses https://blog.captaindns.com/article, here is the network exchange:
Browser request:
GET /article HTTP/1.1
Host: blog.captaindns.com
CaptainDNS server response:
HTTP/1.1 301 Moved Permanently
Location: https://captaindns.com/article
The browser receives the 301 code and navigates to https://captaindns.com/article. The user sees only a brief loading moment.
Required DNS configuration
The DNS configuration depends on the type of domain you are redirecting.
Apex (root domain) vs subdomain
| Type | Example | DNS records |
|---|---|---|
| Apex domain | captaindns.com | A and AAAA to CaptainDNS IPs |
| Subdomain | www.captaindns.com | CNAME to redirect.captaindns.com |
| Subdomain | blog.captaindns.com | CNAME to redirect.captaindns.com |
DNS record examples
For an apex domain (captaindns.com):
captaindns.com. A 76.76.21.21
captaindns.com. AAAA 2606:4700:20::681a:1521
For a subdomain (www.captaindns.com):
www.captaindns.com. CNAME redirect.captaindns.com.
The exact records are displayed in the CaptainDNS dashboard during configuration. Verify propagation with the DNS Propagation Test.
Automatic TLS certificate
Once DNS points to our servers, CaptainDNS issues a TLS certificate via Let's Encrypt. The full process takes under 60 seconds:
- DNS is detected as pointing to our servers
- An ACME challenge (HTTP-01) validates the domain
- The certificate is issued and installed automatically
- Renewal triggers 30 days before expiration
No action on your part is required for HTTPS.
Real-world use cases
Subdomain migration to apex
You are consolidating content from blog.captaindns.com to captaindns.com/blog. Set up a 301 redirect with path forwarding:
blog.captaindns.com/seo-guideredirects tocaptaindns.com/blog/seo-guideblog.captaindns.com/dns-tutorialredirects tocaptaindns.com/blog/dns-tutorial- Backlinks and PageRank are transferred to the main domain
Keep the redirect active for at least 6 months. Google recommends keeping it indefinitely to capture existing backlinks.
Naked domain to www
Your hosting provider (Heroku, some PaaS) does not support apex domains. Redirect captaindns.com to www.captaindns.com with a 301:
- Visitors who type
captaindns.comland onwww.captaindns.com - Google identifies
www.captaindns.comas the canonical domain - The TLS certificate covers
captaindns.comso the HTTPS redirect works
Subdomain consolidation
You own shop.captaindns.com, docs.captaindns.com, and help.captaindns.com alongside the main domain captaindns.com. Redirect each subdomain to the main domain:
shop.captaindns.comredirects via 301 tocaptaindns.com/shopdocs.captaindns.comredirects via 301 tocaptaindns.com/docshelp.captaindns.comredirects via 301 tocaptaindns.com/help
SEO authority is concentrated on a single host. Result: better overall positioning in search results.
Temporary marketing campaign
You launch a promotional campaign on promo.captaindns.com. Set up a 302 redirect to your landing page:
promo.captaindns.comredirects via 302 tocaptaindns.com/promo-summer- Google keeps the source URL in the index (expected behavior for a temporary campaign)
- Disable the redirect in one click from the dashboard once the campaign ends
❓ FAQ - Frequently asked questions
Q: How do I set up a domain redirect?
A: Create a CaptainDNS account, add the source domain, verify ownership via a TXT record, configure the destination URL, and point DNS to our servers. The redirect is active within minutes.
Q: What is a 301 redirect?
A: A 301 redirect (Moved Permanently, RFC 7231 Section 6.4.2) tells browsers and search engines that a page has moved permanently. Google transfers the SEO ranking to the new URL. This is the recommended choice for domain migrations.
Q: What is the difference between a 301 and a 302 redirect?
A: A 301 is permanent: Google indexes the destination and transfers SEO authority. A 302 is temporary: Google keeps indexing the source. Use 301 for permanent migrations, 302 for temporary campaigns or A/B tests.
Q: How do I redirect a domain with HTTPS?
A: CaptainDNS automatically issues a TLS certificate via Let's Encrypt for your source domain. Point DNS to our servers (A/AAAA for an apex, CNAME for a subdomain) and HTTPS is active with no extra configuration.
Q: Can I redirect an apex (naked) domain?
A: Yes. For a root domain like captaindns.com, add A and AAAA records pointing to our servers. For a subdomain like www.captaindns.com, use a CNAME record pointing to redirect.captaindns.com.
Q: Does the redirect preserve the URL path?
A: Yes, if you enable path forwarding. For example, blog.captaindns.com/article redirects to captaindns.com/article. URL parameters (?ref=google) are also preserved if the option is enabled.
Q: How many redirects can I create for free?
A: The free plan includes up to 3 redirects. Each host (www.captaindns.com, blog.captaindns.com) counts as one redirect. Domain verification is shared: verifying captaindns.com covers all its subdomains.
Complementary tools
| Tool | Description |
|---|---|
| DNS Lookup | Query the DNS records of a domain |
| DNS Propagation Test | Check DNS propagation worldwide |
| Domain Check | Analyze the complete DNS configuration of a domain |
| MTA-STS Hosting | Host your MTA-STS policy for free |
| BIMI Hosting | Host your BIMI logo and certificate for free |