Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Subdomain redirecting instead of CNAME

Discussion in 'Bind/DNS/Nameserver' started by BobSmith123, May 21, 2017.

  1. BobSmith123

    BobSmith123 Member

    Joined:
    Apr 5, 2015
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    USA
    cPanel Access Level:
    Website Owner
    In CloudFlare, I've setup a sub.domainA.com to CNAME to domainB.com. I've set sub.domainA.com as a parked domain for domainB.com inside WHM. However, going to sub.domainA.com does a 301 redirect to domainB.com instead of behaving like an alias / CNAME. What is going on?

    I'm on CloudLinux.
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,


    You have a CNAME for sub.domainA.com that points to domainB.com, so if the domainB.com is configured to display its name in the URL, no matter whether you have parked domain on it or subdomain that goes to this domain, it will display what is in the URL of the website that is configured on the main site...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,419
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You should point the subdomain to the IP address of the cPanel server as an "A" record if you'd configured the domain name as an alias on the cPanel server.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice