Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jan 2010
    Posts
    10

    Default Canonical redirect of www to non www for the same domain

    I need to redirect the www version of my domain name to the non www version. cPanel wont allow me to saying that it's points to the same location but I need to do this for the sake of search engines. Normally I'd do this by hand myself but cant now that I'm running cPanel. Any ideas what I should do in this case?

    ty
    Vince

  2. #2
    Member
    Join Date
    Aug 2011
    Posts
    19

    Default Re: Canonical redirect of www to non www for the same domain

    Do you mean you have an A record for your zone, and you want to CNAME www to that A record? I'm hoping this works since it's what I was planning on pointing customers to:

    Simple DNS Zone Editor
    or
    Advanced DNS Zone Editor

    or do you mean you actually want www to redirect?

    Redirects

  3. #3
    Member
    Join Date
    Jan 2010
    Posts
    10

    Default Re: Canonical redirect of www to non www for the same domain

    Quote Originally Posted by tdens View Post
    Do you mean you have an A record for your zone, and you want to CNAME www to that A record? I'm hoping this works since it's what I was planning on pointing customers to:

    Simple DNS Zone Editor
    or
    Advanced DNS Zone Editor

    or do you mean you actually want www to redirect?

    Redirects

    I have a domain name (abc.com) which is set using an A record to an IP address. I have a www CNAMEd to the doamin name. I want all requests for abc.com or www.abc.com to automatically go to abc.com. If they do not then search engines like Google and Yahoo will consider these to be two different domain names and split their ranking evaluation between them.

    I do NOT use the DNS server that comes with cPanel or my system, I set all DNS settings at my domain registrar.

    I want to know how to accomplish this with cPanel.

    ty
    Last edited by Vince778; 08-21-2011 at 11:41 PM.

  4. #4
    Member
    Join Date
    Aug 2011
    Posts
    19

    Default Re: Canonical redirect of www to non www for the same domain

    I do NOT use the DNS server that comes with cPanel or my system, I set all DNS settings at my domain registrar.

    I want to know how to accomplish this with cPanel.
    If you don't use your cpanel/WHM server as your DNS server, you can't change DNS settings through cpanel/WHM.

  5. #5
    Member
    Join Date
    Jan 2010
    Posts
    10

    Default Re: Canonical redirect of www to non www for the same domain

    Please reread my original posting.

  6. #6
    Member
    Join Date
    Aug 2011
    Posts
    11
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Canonical redirect of www to non www for the same domain

    Two ways to get the result you want:
    1) In .htaccess file:
    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
    RewriteRule ^(.*) http://example.com/$1 [L,R=301]

    2) Through the user interface:
    In the Domains section click on Redirects, select the type of redirect and the domain from the drop down list and type in the "redirects to" text box the full web address you want to redirect to.
    The default option is "Redirect with or without www." This is the option you need.
    Very important!!! If you already have indexed results in search engines of the www. version of your website make sure to check the "Wild Card Redirect" box. This will add redirects to "http://www.example.com/page" to "http://example.com/page".

    Good luck

Similar Threads & Tags
Similar threads

  1. 302 Redirect of www to non www for the same domain
    By Vince778 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-22-2011, 07:01 PM
  2. www.domain.com works fine, non-www does not
    By wledbetter in forum New User Questions
    Replies: 5
    Last Post: 08-04-2009, 02:02 PM
  3. How do you redirect non-www to www prefixed domains??
    By DReade83 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-09-2008, 09:51 AM
  4. Replies: 2
    Last Post: 07-19-2006, 08:07 AM
  5. Need help. WWW does not work but the domain works without the WWW
    By urbanhostonline in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-28-2005, 10:19 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube