Knowledge Base

Create a URL Redirect

Did you find this article helpful?
Copy Link

* Your feedback is too short
Share this article

You can redirect your website's visitors from a source URL to a target URL with any of three different commonly used methods. For instance, if you want to direct your customers who would normally hit 'www.example.com' to 'www.examples.com', you would set up a redirect to accomplish that.

You can set up a redirect in a couple of different ways:

WARNING Never create a redirect for 'example.com' to 'www.example.com', or from 'example.com' to 'example.com/index.something'. Doing either will cause an infinite loop: visitors going back and forth between URLs. If you need to control the 'www' and index page, you must use mod_rewrite by adding .htaccess code.

301 (or 302) Redirect via cPanel

  1. Log in to cPanel.

  2. Navigate to the Domains section and click the Redirects icon

  3. From the Type dropdown menu, select which type of redirect is to be used:

    • Permanent 301 is a redirect that will update the visitor's bookmarks and direct search engines to the new site.

    • Temporary 302 is a redirect that will redirect the visitor or search engine but will not update the bookmark, and search engines will continue to index to the original page.

  4. From the "http://(www.)" dropdown menu, choose the domain name you would like to redirect
    Note: if you would like to redirect a single page or directory, you can use the adjacent text field to enter the name of the folder or file.

  5. In the "redirects to" field, enter the full URL of the page to which you will be redirecting

    Note: you must enter the protocol (e.g. 'http://', 'https://' or 'ftp://') as well in order for the domain URL to be accepted.

  6. Select one of the following 'www' redirection options to dictate whether or not the domain will be redirecting:

    • Only redirect with 'www' - only redirects visitors that type 'www.' as part of the URL.'

    • Redirect with or without 'www' - redirects all visitors regardless of if they use 'www.' or not.

    • Do Not Redirect 'www.' will not redirect visitors that use 'www.' as part of the URL

  7. Click the Wild Card Redirect option, if you want to set up a redirect to the same file on a new destination:

    • With Wild Card Redirect, 'www.example.com/about.html' will redirect to 'www.example-destination.com/about.html'.

    • Without Wild Card Redirect, 'www.example.com/about.html' will redirect to 'www.example-destination.com'.

  8. Click Add to create the redirect as specified

Now when visitors type the exact URL that you specified, they will be redirected to the target site you assigned.

Masked Forward and HTML Forward (as parked domain)

You can accomplish something similar to a masked forward in cPanel. This is known as parked domain. Using this method, the parked domain name will show in the browser address bar while displaying your primary domain's website.

Custom .htaccess Redirect

You can add coding to your .htaccess file to customize rewrite and redirect rules. This is an advanced method. Check out our .htaccess cheat sheet too!

See also htaccess, Apache and RewritesRedirect to 'www.yourdomain.com'

Did you find this article helpful?
Copy Link

* Your feedback is too short