New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

Domain forwarding

Domain forwarding sends visitors from one domain to another using HTTP redirects. The guide explains how to configure redirects in cPanel, why DNS records alone cannot forward web traffic, and why email forwarding requires separate MX records.

Gordon FairlieDomains, DNS and email deliverability 9 min read Updated 23 Sep 2026

Domain forwarding

Domain forwarding means sending anyone who visits one domain to another URL. The clean way to do this is an HTTP redirect returned by a web server. DNS cannot perform a web redirect, so you configure this where the web request lands, not in your DNS zone.

Before you start

This picks up from you controlling the domain you want to forward, owning or managing the destination, and being able to log in to cPanel if your site is hosted with Hostworld. If you plan to run the redirect on our hosting, make sure the source domain is added to your Hostworld cPanel account.

  • Know the difference between DNS and redirects. A DNS record tells browsers where to find a server. An HTTP redirect is the server responding “go there instead”. A CNAME only aliases one hostname to another at the DNS layer. It does not issue a web redirect and it cannot be placed at the zone apex. MX and NS records must never point at a CNAME.
  • HTTPS matters. If users reach the source domain over HTTPS, the server must present a valid certificate for that hostname before it can send a redirect. Without SSL, visitors see a certificate error and the redirect does not run. In Hostworld cPanel, use AutoSSL to cover the source domain before you enable HTTPS-only rules.
  • Email is separate. Web forwarding does not forward mail. Mail flow follows MX records. If you move DNS or change nameservers, replicate MX, SPF and DKIM first to avoid a mail outage.
  • Decide if the move is permanent or temporary. For permanent moves use 301 or 308. For temporary use 302 or 307. 307 and 308 preserve the HTTP method and body.
  • Avoid “URL frame” or “masked” forwarding at registrars. That keeps the old domain in the address bar using an HTML frame. It is poor for SEO and analytics. Prefer a 301 or 308.
  • If you will host the redirect on our shared hosting, point the domain to us at your registrar using our nameservers: ns1.serverworld.uk, ns2.serverworld.uk, ns3.serverworld.uk, ns4.serverworld.uk. Changing nameservers moves all DNS to us. Replicate your MX/SPF/DKIM with care first if your mail is elsewhere.

Step 1: Decide the redirect you need

Be clear about scope and status code before you touch anything. It prevents loops and later clean-up.

  • Whole domain to a new domain: example.co.uk to example.com, preserving every path. Use a permanent redirect. In cPanel, tick Wildcard redirect to preserve the path. Example: example.co.uk/any/page goes to example.com/any/page.
  • Single page to a new page: one URL to another, status code 301 if permanent.
  • Canonical host: apex to www, or www to apex. Do this at the web or edge layer. Do not try to use a CNAME at the apex.
  • Permanent vs temporary:
    • Permanent: 301 or 308. Signals the move to browsers and crawlers. 308 preserves the HTTP method and body.
    • Temporary: 302 or 307. Use when you will revert. 307 preserves the method and body.

Step 2: Make sure the source domain reaches a server you control

A web redirect happens on the server that receives the HTTP request. Point the source domain so those requests reach the place you will configure the rule.

  • On Hostworld shared or reseller hosting: add the domain in cPanel so Apache will answer for it, then at your registrar set nameservers to our set: ns1.serverworld.uk, ns2.serverworld.uk, ns3.serverworld.uk, ns4.serverworld.uk.
  • On a Hostworld VPS: configure the redirect in your web server (Apache or Nginx) or at an edge service you use, such as Cloudflare Redirect Rules. If you are moving to a VPS and need hosting with full control, see our Linux VPS.
  • Leaving DNS where it is: you can still redirect, but you must configure the redirect in the web stack that answers for the source hostname, for example a registrar’s forwarding feature or a CDN rule.

Changing nameservers or moving DNS without preparing MX, SPF and DKIM at the new DNS provider risks lost or bouncing mail. Do the mail records first, verify, then switch nameservers.

Step 3: Install SSL for the source hostname

If users will arrive on https://source.example, that server must present a valid certificate for source.example. Otherwise the browser shows a certificate error and will not follow your redirect.

  • In Hostworld cPanel: enable AutoSSL for the domain. Wait until the certificate is issued, then proceed. If your goal is to force HTTPS on the same site, use cPanel > Domains > Force HTTPS Redirect. For cross-domain forwarding use Redirects, not Force HTTPS.
  • At an edge service: ensure it has a valid certificate for the source. Providers document how to enable Universal or managed certificates.

Step 4: Create the redirect in cPanel

For Hostworld shared, WordPress or reseller hosting, use cPanel’s Redirects tool. This writes the rule to your site’s .htaccess.

  1. Log in to cPanel for the source domain.
  2. Go to Domains, then Redirects.
  3. Choose the type: Permanent (301) for domain moves, or Temporary (302) if you expect to undo it.
  4. In “https?://(www.)?”, select the source domain.
  5. Leave the “/” path empty to redirect the whole domain, or enter a path to redirect one folder or page.
  6. In “Redirects to”, enter the full destination including protocol, for example https://newdomain.example/.
  7. Tick “Wildcard redirect” if you want to preserve the path, so /a/b on the source becomes /a/b on the destination.
  8. Click Add.

Notes that matter in production:

  • You cannot edit an existing redirect in cPanel. Delete it and recreate it.
  • cPanel writes redirects to the bottom of .htaccess. If your application or CMS has Rewrite or Redirect rules above, those may override or pre-empt cPanel’s entries. If your redirect does not behave as expected, you may need to move a rule higher or configure it manually.

Step 5: Fix rule order or create the redirect manually in .htaccess

If another rule takes precedence, test with a minimal rule and place it above the CMS block. Back up .htaccess before you edit it. These are Apache examples using mod_alias. They match the current cPanel guidance.

Redirect an entire site to a new domain

What it does: redirects every request under / to the new domain, status 301. The trailing slash preserves paths and query strings.

Redirect 301 / https://newdomain.example/

Redirect one page to a new page

What it does: redirects a specific old path to a specific new URL.

Redirect 301 /original.html https://www.newdomain.example/new.html

Place these rules near the top of .htaccess if app rules below interfere. Common misbehaviour in cPanel is caused by Rewrite/Redirect rules that take precedence. Move your rule higher or reduce to a single minimal rule to confirm it works, then expand as needed.

Step 6: Test the redirect and cache behaviour

Browsers cache redirects. If your test seems wrong, clear the browser cache or use a private window.

  • Use curl to see the status and destination without cache. This does not change anything. It only requests headers.
curl -I http://source.example/any/page

What to look for:

  • Status code: 301, 302, 307 or 308 according to your intent.
  • Location header: the exact destination URL. For wildcard rules, check that the path is preserved as planned.
  • No chains: the old URL should redirect directly to the final one, not hop through another URL first.

Step 7: If you cannot use cPanel, use registrar or edge redirects

If the source domain is not on our hosting, you can still forward it. This happens at their web layer, not in DNS.

  • Registrar forwarding: many registrars offer “URL redirect” or “forwarding”. Behind the scenes their web server returns the redirect. Avoid “URL frame” or “masked” types because they are not true redirects and harm SEO and analytics. Use 301 or 308 for permanent moves, 302 or 307 for temporary.
  • Edge/CDN rules: providers such as Cloudflare expose Redirect or Rules features to perform redirects at the edge. Configure a single canonical rule and avoid conflicting origin rules that can cause loops.

Remember apex limitations. You cannot place a CNAME at the apex. If you need apex-to-www or www-to-apex redirects and you are using a DNS provider’s edge rules, follow their guidance on ALIAS or ANAME records combined with redirects.

Step 8: Keep mail working during and after the change

Forwarding a web domain does not forward email. Mail delivery follows MX records. If your mailboxes live on a different platform from the web redirect, leave MX pointing there.

  • Staying on the same DNS: do nothing for mail. The web redirect is separate.
  • Changing nameservers to Hostworld: before you switch at the registrar, add your existing MX, SPF and DKIM records to the DNS zone in Hostworld cPanel so mail continues to route correctly. MX and NS must not point to a CNAME.
  • Forwarding mail to another address: in Hostworld cPanel, use Email > Forwarders to create mailbox or domain-level forwarders. This is independent of web redirects.

Moving DNS without recreating mail records first can cause queuing or bounces until fixed. If you are unsure, open a support ticket and we will review the plan with you.

Step 9: SEO guidance for domain and URL moves

For search engines and long-term signals, prefer a server-side 3xx redirect. Follow these points.

  • Use 301 or 308 for permanent moves. These are the signals Google expects for site moves.
  • Map old URLs to their true new URLs where possible. Avoid redirecting many old URLs to an irrelevant page such as the homepage. That can be treated as a soft 404.
  • Avoid redirect chains. Link old URLs directly to the final destination.
  • Keep redirects in place as long as possible. Google advises at least a year, and to keep ownership of the old domain for at least a year after a domain-level move.
  • Update internal links, canonical tags and sitemaps to the destination URLs. Do not rely on redirects inside your own site longer than needed.
  • Client-side methods such as meta refresh are not recommended for site moves.

Step 10: Troubleshoot common problems

  • Redirect loops (ERR_TOO_MANY_REDIRECTS): usually caused by conflicting rules at origin and edge, or A redirects to B while B redirects to A. Remove one side. Define one canonical path and test again.
  • HTTPS shows a certificate error: you do not have a valid SSL for the source hostname. Install a certificate first. In Hostworld cPanel, enable AutoSSL for the domain and wait for issuance.
  • cPanel redirect does not seem to work: your CMS or app has .htaccess rules above cPanel’s block. Move your rule higher or configure it manually near the top of .htaccess.
  • Tests are inconsistent: browsers cache redirects. Clear cache, use a private window, and verify with curl -I to see current headers.

If you need hands-on help with a Hostworld site or domain, open a support ticket. Include the source URL, the intended destination, and what you have configured so far.

What next

  • Next step: update internal links, canonical tags and your sitemap to the new URLs so you are not relying on redirects inside your own site.
  • If you are moving the site to your own server, review our VPS guides for server-level tasks, or explore our Linux VPS if you need a new home for your site.
  • If anything in this guide blocks you, open a support ticket and we will take a look.

Common questions

Do I need to change DNS to forward a domain?

No. DNS does not perform web redirects. A redirect happens when a web server, CDN or registrar forwarding service answers a request and returns a 3xx response with a Location header. You only change DNS or nameservers if you want those requests to reach a different place that you control, such as Hostworld cPanel, to manage the redirect there.

Does domain forwarding move my email?

No. Web forwarding has no effect on mail. Email delivery follows MX records. If MX stays the same, mail stays where it was. If you change nameservers or DNS hosts, recreate MX, SPF and DKIM at the new DNS host before the switch. If you want mail to forward, use Email > Forwarders in cPanel to set mailbox or domain forwarders.

Should I use 301, 302, 307 or 308?

Use 301 or 308 for a permanent move. 308 preserves the HTTP method and body for POST or other non-GET requests. Use 302 or 307 for temporary moves. 307 preserves the method and body.

How do I redirect the apex to www, or www to apex?

Do it at the web or edge layer with a 301 or 308. You cannot put a CNAME at the zone apex by standard. Point the apex with A or AAAA to a server that issues the redirect, or use a provider’s ALIAS or ANAME with an edge redirect feature. In cPanel, use Redirects to set the canonical host, not DNS.

How do I change or undo a redirect in cPanel?

You cannot edit an existing redirect. Delete it in cPanel > Domains > Redirects, then add a new one with the desired settings. Remember that cPanel entries go at the bottom of .htaccess, so check rule order if behaviour is unexpected.