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.

Domain aliasing

Discussion in 'General Discussion' started by csjesse, Jul 13, 2010.

  1. csjesse

    csjesse Registered

    Joined:
    Jul 13, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Trying to get domainX.com to be an alias (redirect, but still use domainX.com domain name) of domainY.com/forum

    Note: I don't want domainY.com/ to be exposed-just the forum subfolder. How do I configure this in cpanel? I already have the aliases domain nameservers set.

    In other words, how do I change the Domain Root from /public_html to, say, /public_html/forum?

    Thanks
     
    #1 csjesse, Jul 13, 2010
    Last edited: Jul 13, 2010
  2. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    If I understand you correctly you want domainX.com to load contents from public_html/forum. In that case, why don't you make domainX.com an addon loading from the folder forum via "cPanel >> Domains >> Addon Domains".
    If you want to change a root of an already parked domain or the main domain, that needs to be done manually in cPanel userdata file located at /var/cpanel/userdata/username/domain.com and then Apache configuration needs rebuilt.
     
  3. csjesse

    csjesse Registered

    Joined:
    Jul 13, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Howard, you're right. I've added it as an addon loading from public_html/forum.
    After setting the domain's nameservers (which is already registered - godaddy), should it point to the contents of public_html/forum automatically?
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    If the domain is successfully setup as an add-on domain in cPanel with a document root of the desired "forum" sub-directory then the answer is yes that the domain should automatically serve content from the forum directory path. This will require that the correct name servers are set at the domain registrar; for example, you should be able to use the same name servers that are used for other domains on the same cPanel server. When a domain is added in cPanel, (either a parked domain or an add-on domain), a DNS zone is created so that your name servers should automatically be able to handle any incoming DNS requests for the newly-setup domain.
     
    #4 cPanelDon, Jul 13, 2010
    Last edited: Jul 13, 2010
  5. csjesse

    csjesse Registered

    Joined:
    Jul 13, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Don, it redirects correctly. However, once a user goes to 'domainX.com' the address changes to 'domainY.com/forum'. Is there a way to have it appear as 'domainX.com/forum'?

    Thanks.
     
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I believe I may have misunderstood the desired intention.

    To help clarify, please identify which of the following options most closely resembles what you are trying to accomplish:
    • A.) Have "domainX.tld" show the contents of "/forum" without redirecting; the contents of "/forum" are served directly by visiting "domainX.tld" without using or typing "/forum"
    • B.) Have "domainY.tld" show the contents of "/forum" without redirecting; the contents of "/forum" are served directly by visiting "domainY.tld" without using or typing "/forum"
    • C.) Have "domainX.tld" be parked on top of "domainY.tld" -- making the two domains interchangeable where each shows the same content and without redirecting
    • D.) Have "domainY.tld" be parked on top of "domainX.tld" -- making the two domains interchangeable where each shows the same content and without redirecting
    • E.) Other, none of the above; please provide more specific detail
     
    #6 cPanelDon, Jul 14, 2010
    Last edited: Jul 14, 2010
  7. csjesse

    csjesse Registered

    Joined:
    Jul 13, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    B.) Have "domainY.tld" show the contents of "/forum" without redirecting; the contents of "/forum" are served directly by visiting "domainY.tld" without using or typing "/forum"

    I believe that is closest...here are more details-

    Right now I have domainY.tld as an addon domain with a a document root: public_html/forum and redirecting to http://domainX.tld/forum/general-discussion/ (so that users start on that forum subcategory).

    When a user visits domainY.tld, it directs to http://domainX.tld/forum/general-discussion/, like it should. I want the address bar to show http://domainY.tld/forum/general-discussion/. Moreover, if the user navigates to another page, I would like the address bar to continue showing the root as domainY.tld/.. Is this possible?

    Thanks Don.
     
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Without seeing the configuration directly it's difficult for me to accurately determine what is necessary; if the issue is solely within the redirect or mod_rewrite entries, (e.g., in an Apache .htaccess file), this may be easy to fix without having to reconfigure the domain name that the forums use natively. If there is difficulty using cPanel to setup the desired redirects you're welcome to submit a support request and include in the subject/title "Attn Don" and I'll be happy to take a look at it for you.
     
    #8 cPanelDon, Jul 15, 2010
    Last edited: Jul 15, 2010
Loading...

Share This Page