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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Subdomain redirecting instead of CNAME

Discussion in 'Bind / DNS / Nameserver Issues' 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,480
    Likes Received:
    60
    Trophy Points:
    28
    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...
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page