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.

Redirect Domain display same URL?

Discussion in 'General Discussion' started by stefanmain, May 12, 2010.

  1. stefanmain

    stefanmain Active Member

    Joined:
    May 12, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    At the recommendation of my webhost, I am changing my domain (mydomain.com) from PlusMail to cPanel 1.0 (RC1). At PlusMail, in addition to mydomain.com, I have a parked domain, mydomain.org, which is redirected to mydomain.com. When a browser is directed to www.mydomain.org, it opens mydomain.com, but in the browser's address slot, there continues to appear "mydomain.org" even when the browser follows links within mydomain.com. That is, a person visiting www.mydomain.org is never aware he or she is actually browsing a parked domain because the URL in the address slot always displays www.mydomain.org/whatever.html. My question: Can that be accomplished in cPanel? The tech support people at my webhost aren't sure. They say that in cPanel, the instant a web page opens a parked domain, the URL displayed in the browser's address slot will change from mydomain.org to mydomain.com, and remain mydomain.com as long as the visitor follows relative links in my domain. Thus, a visitor will instantly know that he or she is actually browsing a "different" domain name. (I apologize for the length of this post. I am sure there is a simple, technical way to ask this question, but I don't know it.) Thank you. Stefan
     
  2. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    You want domain mydomain.org parked domain on main domain mydomain.com and once any visitor browser mydomain.org/anything.html its still show domain name mydomain.org in browser and don't be mydomain.com.

    In that case while developing site for your main domain mydomain.com do not define domain name mydomain.com in your any web pages. Always use physical paths for sites link in files. The physical path will be like /home/user/public_html/anything.html etc. So that when ever any visitor browse domain mydomain.org/anythng.html files will be accepted from physical path and not from your domain mydomain.com.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The current version of cPanel/WHM is version 11.25. I extremely strongly advise moving to version 11.25.

    If you use Parked Domains, the user will always see the domain they entered in their browser's address bar as long as your page is coded with relative links. You can view a comparison of Parked Domains vs. Addon Domains at:

    AddonvsParked < AllDocumentation/AllFAQ < TWiki
     
  4. stefanmain

    stefanmain Active Member

    Joined:
    May 12, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Thanks. First, I apologize. I read the version number in the wrong place. At the expanded Stats, it is 11.25.0-STABLE Build 44718.

    As it happens, I have another domain that has been using cPanel for a short while. It also has a parked domain that is redirected to the main domain. On cPanel's "Parked Domain" page, under "Domains" is the name of the parked domain, say parked.com, under "Domain Root" is /public_html, and under "Redirects to" is the full URL of the main domain, http://www.maindomain.com. When I enter the parked domain into a browser address slot as "http://www.parked.com", the maindomain page opens okay, but in the address bar, the displayed address INSTANTLY changes to "http://www.maindomain.com" Clearly, I have done something wrong. From what I have told you, can you tell what it is?

    At "Subdomains" is "No subdomains are configured", and at "Addon Domains" is "No Addon Domains are configured".

    Also, all the links at maindomain.com to other pages within the website itself are what I think is meant by relative, that is just the name of the page, like books.html not "http://www.maindomain.com/books.html"
     
    #4 stefanmain, May 12, 2010
    Last edited: May 12, 2010
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The redirection you setup is what is causing the domain to change in the URL bar. Click "Manage Redirection" next to the parked domain and click "Disable Redirection." This will remove the redirection and just rely on parked domain functionality (which is what you want based on what you describe).
     
  6. stefanmain

    stefanmain Active Member

    Joined:
    May 12, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    That did it! Thank you.
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Expanding upon what David said .....

    Many people incorrectly believe that "parked" domains are redirects.

    Actually a "parked domain" in Cpanel is a "serveralias" which is a secondary domain internally to reach the same site content.

    Or, to put that another way ----

    You have have a single web site that answers to multiple domain names

    It is not a redirect to the main domain

    The "parked domain" itself is actually a secondary "main domain"

    Some script programs will override the address bar with whatever
    domain is in the script configuration so if you have a shopping cart or
    CMS system on your site, it may update the web site address bar with
    whatever domain you are using in the configuration for that web
    program and that may be the source of some of the "redirect" misconception
     
Loading...

Share This Page