How to redirect a domain

Domain redirection automatically sends visitors from one domain to another, useful for rebranding, multiple domains, or temporary changes.

Types of redirects

301 Redirect (Permanent)

  • SEO-friendly: Passes ranking power to new domain
  • Browser caching: Browsers remember the redirect
  • Best for: Permanent moves, rebranding, domain consolidation
  • HTTP status: 301 Moved Permanently

302 Redirect (Temporary)

  • Temporary solution: Indicates change is not permanent
  • No SEO transfer: Search engines don't transfer ranking
  • Best for: Maintenance, testing, short-term changes
  • HTTP status: 302 Found

Setting up redirects in cPanel

Step 1: Access Redirects

  1. Log in to your cPanel
  2. Navigate to the Domains section
  3. Click on Redirects

Step 2: Configure redirect

  1. Select redirect type:
    • Permanent (301) - for permanent moves
    • Temporary (302) - for temporary changes
  2. Choose the domain to redirect from the dropdown
  3. Leave the path field empty for full domain redirect
  4. Enter the destination URL in the "Redirects to" field

Step 3: Additional options

  • Wild Card Redirect: Check to redirect all subdirectories
  • www redirection: Check to redirect www version too

Step 4: Apply redirect

  1. Click Add to create the redirect
  2. Test the redirect by visiting your domain
  3. Verify the redirect works with different browsers

Common redirect scenarios

Full domain redirect

Redirect entire domain to another domain:

  • From: olddomain.com
  • To: https://newdomain.com
  • Type: Permanent (301)
  • Wild Card: Enabled

Subdomain redirect

Redirect subdomain to main domain:

  • From: blog.example.com
  • To: https://example.com/blog
  • Type: Permanent (301)

HTTPS redirect

Force HTTPS for security:

  • From: http://example.com
  • To: https://example.com
  • Type: Permanent (301)
  • Wild Card: Enabled

Using .htaccess for redirects

Full domain redirect

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

HTTPS redirect

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Specific page redirect

Redirect 301 /old-page.html https://example.com/new-page.html

DNS-level redirects

Using CNAME records

  1. Access your DNS management panel
  2. Create a CNAME record pointing to destination domain
  3. Set TTL to appropriate value (300-3600 seconds)
  4. Save and wait for propagation

URL forwarding service

  1. Enable URL forwarding in domain settings
  2. Choose forwarding type (frame or redirect)
  3. Enter destination URL
  4. Apply settings and test

Testing your redirects

Browser testing

  1. Clear browser cache and cookies
  2. Visit the original domain
  3. Verify it redirects to the correct destination
  4. Test with different browsers

Online tools

  • HTTP status checkers: Verify redirect code (301/302)
  • Redirect trace tools: Follow redirect chain
  • SEO tools: Check redirect impact

Best practices

SEO considerations

  • Use 301 redirects: For permanent moves to preserve SEO
  • Avoid redirect chains: Don't redirect to another redirect
  • Update internal links: Point directly to new URLs
  • Monitor traffic: Watch for any issues after redirect

Performance tips

  • Minimize redirects: Each redirect adds load time
  • Use server-level redirects: Faster than JavaScript redirects
  • Set appropriate TTL: Balance caching with flexibility

Managing redirects

Viewing existing redirects

  1. Return to cPanel Redirects section
  2. View list of current redirects
  3. Note redirect type and destination

Modifying redirects

  1. Click Edit next to the redirect
  2. Update destination URL or redirect type
  3. Save changes and test

Removing redirects

  1. Click Delete next to the redirect
  2. Confirm deletion
  3. Test that redirect no longer works
Important: Test redirects thoroughly before making them live to avoid broken links or SEO issues.
Tip: Use 301 redirects for permanent moves to maintain search engine rankings and avoid duplicate content issues.