The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

URL canonical for all sites

Discussion in 'Bind / DNS / Nameserver Issues' started by consultant, Jan 8, 2016.

  1. consultant

    consultant Member

    Joined:
    Nov 18, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Seattle
    cPanel Access Level:
    Root Administrator
    I just noticed by default all sites on Cpanel don't domain.com www.domain.com. Rather than do a .htaccess rule for each site how can I change it to the default for all website to redirect 301 domain.com to www.domain.com? Or is it better practice to do it the other way around? It seems Google defaults to www when you do have redirection setup so I figured best to redirect to what Google defaults to.

    p.s. I have modsecurity running
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The "www" alias is added by default. Could you provide an example of what you are attempting to configure? For instance, are you attempting to configure a redirect to ensure the "www" prefix loads by default when accessing the "non-www" prefix in your web browser?

    Thank you.
     
Loading...

Share This Page