If you would like to exclusively use either the www or non-www version of your domain, this can be through the redirects area of cPanel. Redirecting a domain to either the www version or non-www version is a little different from redirecting one domain to another, so we've created this article to walk you through how to do either one.

This type of redirection can help with URL canonicalization by search engines. URL canonicalization refers to the process by which a search engine decides which version of your site's URL is best to display in search results. By redirecting to one version of your site, you will have more control over which URL appears in search results. Per Google Webmaster Guidelines, this may also help to limit possible dilution of page rank that can occur if Google can't determine which version of your URL should be preferred.

First, you will want to decide which version of your site you prefer. This is really a personal preference and the only important thing is to be consistent. So, it's best to pick one up front and stick with it.

Redirecting Your Domain to www URL.

  1. Begin by logging into cPanel
  2. Select the Redirects icon under the Domains area of your cPanel home page.

    redirect1

  3. Keep the Type as the default, Permanent(301).
  4. Select your domain name from the drop down menu on the next line.
  5. In the redirects to text box, type in the full URL of your domain, including www (e.g. http://www.yourdomain.com).
  6. Select the radio button next to Do Not Redirect www.
  7. Click the Add button to add your redirect

    redirect-www-domain

  8. You can test your redirect by typing in the non-www version of your domain into your browser address bar. You will be automatically redirected to the www URL.

    testing-www-redirect-1

    testing-www-redirect-2

Redirecting Your Domain to non-www URL

  1. Begin by logging into your cPanel account.
  2. Click on the Redirects icon under the Domains area of your cPanel home page.

    cpanel-redirects

  3. Keep the Type as the default, Permanent(301)
  4. Select your domain name from the drop down menu on the next line.
  5. In the redirects to text box, type in the full URL of your domain, without the www (e.g. http://yourdomain.com).
  6. Select the radio button next to Only redirect with www.
  7. Click the Add button to add your redirect

    redirect-non-www-domain

  8. If you want to test your new redirect, type in the www version of your domain name into your browser. You will be redirected to the non-www URL for your domain.

    testing-non-www-redirect-1 testing-non-www-redirect-2

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Help Center:
Email Address
Optional, but our team may contact you for more information.
Did you find this article helpful?

Comments

2012-11-05 6:55 pm
Great article on setting up the redirect.

Would it be best to check the Wild Card Redirect also? Won't this further help URL canonicalization so that all pages on the site use the same domain.

For example, mydomain.com/news.html would get redirected to www.mydomain.com/news.html
9,413 Points
2012-11-05 8:02 pm
arnelc
Staff
Hello Chuckyaynesphoto,

If you are trying to make all of your URLs redirect in that fashion, then yes, that is a very good idea.

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.

Regards,

Arnel C.

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.