How to Redirect a Domain or URL

How to Redirect a Domain or URL

Overview

A redirect automatically sends visitors from one web address to another.

For example, you might want visitors who go to:

oldexample.com

to automatically be sent to:

newexample.com

Redirects are useful when:

  • You've moved a website to a new domain.

  • You've changed the address of a page.

  • You want multiple domains to point to one website.

  • You've moved content to a different URL.

  • You want an old URL to send visitors to its new location.

  • You're changing from one version of a URL to another.

Have Freedom Hosting provides redirect management through cPanel.


Types of Redirects

The two redirect types you're most likely to encounter are 301 and 302.

301 Permanent Redirect

A 301 redirect tells browsers and search engines that a page or website has permanently moved to a new address.

For example:

oldexample.com → newexample.com

Use a 301 redirect when the change is intended to be permanent.

This is generally the appropriate choice when permanently moving a website or page.


302 Temporary Redirect

A 302 redirect indicates that the destination is temporary.

For example, you might temporarily send visitors from:

example.com → example.com/maintenance

while performing maintenance.

Use a 302 redirect when you expect the original address to become active again.


Creating a Redirect in cPanel

Redirects can be managed through:

cPanel → Domains → Redirects

Depending on your cPanel version and hosting configuration, the exact options may look slightly different.

To create a redirect:

  1. Log in to cPanel.

  2. Open Redirects under the Domains section.

  3. Select the redirect type.

  4. Select the domain or enter the URL you want to redirect.

  5. Enter the destination URL.

  6. Review the redirect settings.

  7. Create the redirect.

  8. Test the original URL in a browser.


Redirecting an Entire Domain

Suppose you have:

oldexample.com

and your new website is:

newexample.com

You could create a permanent redirect from the old domain to the new one.

Visitors who enter the old domain will then be sent to the new website.

This is commonly used when a business changes its domain name.


Redirecting a Specific Page

You don't have to redirect an entire website.

You can redirect an individual page.

For example:

example.com/old-page

could redirect to:

example.com/new-page

This is useful when you've renamed or reorganized pages on your website.


Redirecting to Another Website

A URL can also redirect to a completely different website.

For example:

example.com/support

could redirect visitors to:

support.example-other-site.com

The destination can be another domain, subdomain, or specific page.


Redirecting HTTP to HTTPS

Many websites should use HTTPS rather than unencrypted HTTP.

For example:

http://example.com

can redirect to:

https://example.com

This ensures visitors are sent to the secure version of the website.

However, HTTPS redirects should only be configured once the website has a valid SSL certificate and HTTPS is working correctly.

If HTTPS isn't configured properly, you can accidentally create a redirect problem that prevents visitors from reaching the website.


Be Careful With Redirect Loops

A redirect loop occurs when one URL redirects to another URL that eventually redirects back to the original URL.

For example:

example.com
     ↓
www.example.com
     ↓
example.com
     ↓
www.example.com

The browser can continue following the redirects until it gives up.

If your website displays an error such as "Too Many Redirects", a redirect loop is one possible cause.

Check your redirect rules and your website's own URL settings.


Redirects and WordPress

If your website uses WordPress, redirects can sometimes be controlled by more than one system.

For example:

  • cPanel redirects

  • WordPress settings

  • WordPress plugins

  • .htaccess rules

  • Your DNS or CDN provider

If you create a redirect in cPanel and another redirect is configured inside WordPress, they may conflict.

If you are troubleshooting a redirect problem, check whether multiple systems are attempting to control the same URL.


Redirects vs. DNS

A redirect and a DNS record are not the same thing.

DNS determines where a domain or hostname points.

A redirect tells a web browser to go somewhere else.

For example:

DNS:

example.com → hosting server

Redirect:

example.com/old-page → example.com/new-page

You generally don't create a web redirect using Zone Editor.

DNS records should be managed through:

cPanel → Domains → Zone Editor

when DNS is managed through your hosting account.

Web redirects are managed separately through the appropriate redirect tools.


Redirects and Domain Aliases

If you want two domains to display the same website, a redirect may or may not be the right solution.

For example:

example.com
example.net

could both be associated with the same website.

If visitors should always end up at example.com, you can redirect the second domain to the primary domain.

If both domains are intended to remain accessible as separate addresses for the same website, a different domain configuration may be more appropriate.

If you're unsure which setup you need, contact Have Freedom Hosting Support before making changes.


Testing a Redirect

After creating a redirect, test it from a browser.

For example:

https://oldexample.com

should send you to the expected destination.

Also test:

  • The HTTP version, if applicable

  • The HTTPS version

  • The www version, if applicable

  • Specific pages you're redirecting

  • The final destination

If a redirect doesn't work immediately after a configuration change, allow a little time and clear your browser cache before troubleshooting further.


Common Redirect Problems

"My Redirect Isn't Working"

Check that:

  • The source URL is correct.

  • The destination URL is correct.

  • The redirect was actually created.

  • The domain points to the correct hosting service.

  • Another redirect isn't overriding it.

  • WordPress or another application isn't controlling the same URL.


"I Get Too Many Redirects"

This usually indicates that multiple redirect rules are conflicting.

Check:

  • cPanel redirects

  • WordPress URL settings

  • Redirect plugins

  • .htaccess rules

  • HTTPS configuration

  • Any CDN or proxy configuration

Remove or correct conflicting rules rather than continuing to add more redirects.


"My Redirect Goes to the Wrong Page"

Review the destination URL carefully.

A redirect sends visitors exactly where it has been configured to send them. Check for:

  • Typographical errors

  • Incorrect paths

  • Missing https://

  • Incorrect domain names

  • Incorrect page names


"My Redirect Works on One Device but Not Another"

Your browser may have cached an older redirect.

Try:

  • Opening the URL in a private/incognito window.

  • Clearing the browser cache.

  • Testing from another browser.

  • Testing from another device or network.


Before Creating a Permanent Redirect

Take a moment to verify the destination.

A 301 redirect is intended to represent a permanent move.

If you're simply testing a temporary configuration, consider whether a 302 redirect is more appropriate.

If you're moving an entire website, also make sure:

  • The new website is working.

  • DNS is configured correctly.

  • HTTPS is working.

  • Important pages have corresponding destinations.

  • Email DNS records haven't been accidentally changed.

  • You have a backup of the existing website.


Need Help?

If you're unsure which type of redirect you need, or a redirect is causing problems with your website, contact Have Freedom Hosting Support.

Include:

  • The URL you're trying to redirect

  • The destination URL

  • Whether the redirect should be permanent or temporary

  • Any error message you're seeing

  • Whether the website uses WordPress or another application

Providing both the original and destination URLs makes it much easier to troubleshoot the problem.

 

  • 0 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

Understanding Domain Names and DNS Records

Understanding Domain Names and DNS Records Overview Your domain name is the address people use...

How to Change Your Domain's Nameservers

How to Change Your Domain's Nameservers Overview When you purchase hosting from Have Freedom...

How to Add or Change a DNS Record

How to Add or Change a DNS Record Overview DNS records control where different parts of your...

How To Create a Subdomain

How to Create a Subdomain Overview A subdomain is an additional address that uses your existing...

How to Check and Troubleshoot Your Domain's DNS

How to Check and Troubleshoot Your Domain's DNS Overview DNS (Domain Name System) is...

Powered by WHMCompleteSolution