Knowledgebase

How to forward a domain to another website (URL redirect)

This guide shows you how to forward a domain to another website with a URL redirect, for example sending old-brand.com to new-brand.com, or sending a second domain (.net, .com.eg) to your main site. You will learn the difference between permanent (301) and temporary (302) redirects, how to do it in cPanel, and how to keep your Google rankings when moving to a new domain.

301 or 302?

  • 301 Permanent: use it when the move is final (rebranding, extra domains, merging sites). Search engines transfer the old domain's ranking to the new one.
  • 302 Temporary: use it for short campaigns or maintenance, when the old address will come back.

Avoid "masked" or "frame" forwarding that keeps the old domain in the address bar. It breaks HTTPS on many sites, confuses visitors and is bad for SEO.

Method 1: Redirect in cPanel (domain on EgWeb hosting)

The domain you want to forward must point to your hosting and exist in cPanel. If it is a second domain, first add it in cPanel under Domains → Create A New Domain.

  1. Log in to cPanel and open Redirects (in the Domains section).
  2. Type: choose Permanent (301) or Temporary (302).
  3. https?://(www.)?: select the domain to forward. Leave the path box after the slash empty to redirect the whole domain.
  4. Redirects to: type the full destination, e.g. https://new-brand.com/.
  5. www. redirection: choose Redirect with or without www. so both versions are forwarded.
  6. Tick Wild Card Redirect if you want old-brand.com/contact to go to new-brand.com/contact (keep the same paths). Leave it unticked to send every page to the destination home page.
  7. Click Add, then test the old domain in an incognito window.

Method 2: .htaccess rule (more control)

If you prefer, add this at the top of the .htaccess file in the old domain's document root (download a backup copy first):

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-brand\.com$ [NC]
RewriteRule ^(.*)$ https://new-brand.com/$1 [R=301,L]

This keeps every path, so old links and indexed pages land on the matching page of the new site. Do not combine it with a cPanel redirect for the same domain, or you may create a loop (How to fix ERR_TOO_MANY_REDIRECTS).

Method 3: Domain without hosting

A redirect needs a web server to answer the request, so a domain with only DNS cannot redirect by itself. Options:

  • Add the domain to your existing EgWeb hosting and use Method 1. This is the simplest.
  • If the domain's DNS is on Cloudflare, use a Cloudflare Redirect Rule with a proxied (orange-cloud) DNS record.
  • Not sure what applies to your domain? Contact support and we will advise.
HTTPS on the old domain: visitors who type https://old-brand.com need a valid certificate on the old domain before they are redirected. When the old domain points to your EgWeb hosting, AutoSSL covers it automatically; see How to get a free SSL certificate (AutoSSL).

Moving to a new domain without losing SEO

  1. Use 301 with paths preserved (wildcard or the .htaccess rule above).
  2. Keep the old domain renewed for at least a year or more; letting it expire breaks the redirect.
  3. Verify the new domain in Google Search Console and use its Change of address tool.

Frequently asked questions

Will email on the old domain still work?

Yes. A web redirect does not change MX records. Email to the old domain keeps working as before, unless you remove its mailboxes.

How long until the redirect works?

Immediately if the domain already points to the hosting. If you just changed its DNS, wait for propagation.

Can I forward to a Facebook page or WhatsApp link?

Yes, any full URL works as the destination, for example https://wa.me/20XXXXXXXXXX.

Need help? Open a support ticket or message us on WhatsApp +20 127 113 3655.

  • domain forwarding, URL redirect, 301 redirect, cPanel Redirects, redirect old domain, htaccess redirect, تحويل الدومين لموقع تاني

Was this answer helpful?

0 Users Found This Useful