How to set up 301 redirects in cPanel

Ever wondered how to set up 301 redirects in cPanel? It’s actually very easy!

Setting up 301 redirects is more important than you think, especially if you have a new website developed. In many cases, if you have a new website developed, the URLs can change. This means any indexed pages on the old site will now have broken links in search pages, so it’s important to create redirects to their new URLs to avoid losing potential customers or traffic.

[alert color=”6EB0E2″]What is a 301 redirect?

The HTTP response status code 301 Moved Permanently is used for permanent URL redirection, meaning current links or records using the URL that the response is received for should be updated. The new URL should be provided in the Location field included with the response.

RFC 2616 states that:

  • If a client has link-editing capabilities, it should update all references to the Request URL.
  • The response is cachable.
  • Unless the request method was HEAD, the entity should contain a small hypertext note with a hyperlink to the new URL(s).
  • If the 301 status code is received in response to a request of any type other than GET or HEAD, the client must ask the user before redirecting.[/alert]
To set them up, follow these easy steps:
  • Log in to cPanel – these details will have been provided to you when you set up your hosting account. In most cases you can access this by going to yourdomain.com/cpanel.
  • Navigate to the ‘Domains’ section – on this page will be a section full of domain name settings. The options are usually ‘Addon Domains’, ‘Subdomains’, ‘Aliases’, ‘Redirects’, ‘Simple Zone Editor’ and ‘Advanced Zone’ editor. Your option may slightly differ depending on the host you use, but you will want to choose the ‘Redirects’ option. You should then see something that looks similar to this:
How to set up 301 redirects in cPanel - JDAB.co.uk
301 redirect management in cPanel
  • Type – you will want to leave this as ‘Permanent (301)’ to ensure all traffic gets to the appropriate page.
  • http://(www.)? – this only applies if you have multiple domain names on your account. In most cases, just leave it as ‘** All Public Domains **’, but if required, you can choose your specific domain name.
  • / – This is the part of the URL which is no longer in use/needs to be forwarded. If you have a page which has the alias of /about-us but is no longer live on the website as you switched it to /about, you would put /about-us in here.
  • Redirects to – this is the URL that the above will forward on to. Type in the part after the / (forward slash) that the content needs to redirect to (i.e. your new page). In the case we used above, this would be /about.
  • Redirect with or without www. – this is dependant on how you’ve got your DNS set up, but in most cases it’s best to leave it including both the www. version and the non-www. version.
  • Add – once those fields have been filled out, press ‘Add’ and you will have successfully added a 301 redirect in cPanel!

Now you’ve learned how to set up 301 redirects in cPanel, make sure you go through your whole website and make all of the required redirects to ensure you’re not missing out on potential visitors.

8 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.