Skip to main content

Temp URL to access domain before DNS propagation

Comments

12 comments

  • jfall123
    Not that I know of, but I fail to understand how/why you think that method would be any more secure than serverip/~user
    0
  • cPanelMichael
    Hello, You'd have to manually add the subdomain to the cPanel account as an alias (parked domain) for that to work. Additionally, you'd need to enable the following option under the "Domains" tab in "WHM >> Tweak Settings": Allow users to park subdomains of the server"s hostname. Note that we do have a document on modifying the hosts file on a local computer should the end-users need help setting it up: How to Modify your hosts File - cPanel Knowledge Base - cPanel Documentation Thank you.
    0
  • electric
    You'd have to manually add the subdomain to the cPanel account as an alias (parked domain) for that to work. Additionally, you'd need to enable the following option under the "Domains" tab in "WHM >> Tweak Settings": Allow users to park subdomains of the server"s hostname.

    OK, I enabled that setting in the WHM "Tweak Settings", and then logged into the customer's cpanel account and tried to add a subdomain of the server hostname. I got this error: --------------- There was an error when the system attempted to create the alias. Park::park failed: (XID a3wpm2) The domain "username.unique.ServerHostname.com" may not be created by "username" because "ServerHostname.com" is already owned by another user. --------------- Do you have any idea what might be the problem?
    0
  • sparek-3
    If there were a Park a Domain in the WHM API, that would help immensely. You could then create a hook to do this. But the calls for a WHM API Park a Domain function have been there for years and there's been no movement on that front.
    0
  • cPanelMichael
    may not be created by "username" because "ServerHostname.com" is already owned by another user.

    You'd also need to enable: "Allow cPanel users to create subdomains across accounts" Note that you should disable these options after you create the subdomains to avoid misuse of this feature from cPanel users. Thank you.
    0
  • electric
    You'd also need to enable: "Allow cPanel users to create subdomains across accounts" Note that you should disable these options after you create the subdomains to avoid misuse of this feature from cPanel users. Thank you.

    I also tried using the WHM "Park a Domain" page, and this function allowed the subdomain "username.unique.ServerHostname.com" to be added successfully. (I am logged into WHM as root user.) However, when I go to the URL in my browser, it shows this page: http://username.unique.ServerHostname.com/cgi-sys/defaultwebpage.cgi It does not show the customer's website files, which I parked this hostname on top of. (I know the subdomain was added to the server, because I can actually see the "username.unique.ServerHostname.com" subdomain listed in the customer's cpanel account in the "aliases" page.) Any ideas what is the problem?
    0
  • cPanelMichael
    Hello, Can you reproduce the same behavior when removing it as a WHM parked domain name, and instead adding the subdomain using "cPanel >> Aliases"? Thank you.
    0
  • sparek-3
    I would try restarting Apache first. Perhaps the DNS entry was made but Apache did not restart after adding the ServerAlias. Additionally running:
    grep -B1 username.unique.ServerHostname.com /etc/apache2/conf/httpd.conf
    Should produce something and should show ServerName theusersmaindomain.tld
    0
  • electric
    Hello, Can you reproduce the same behavior when removing it as a WHM parked domain name, and instead adding the subdomain using "cPanel >> Aliases"? Thank you.

    Yes, the exact same behavoir happens when I try that. Here is what I tried: 1. Enable the following two "Tweak Settings" in WHM: Allow users to park subdomains of the server"s hostname. Allow cPanel users to create subdomains across accounts. 2. Login to customer's cpanel, and go to "Aliases" page. 3. Try to create alias for "
    0
  • electric
    Hello, Can you reproduce the same behavior when removing it as a WHM parked domain name, and instead adding the subdomain using "cPanel >> Aliases"? Thank you.

    Yes, the exact same behavoir happens when I try that. Here is what I tried: 1. Enable the following two "Tweak Settings" in WHM: Allow users to park subdomains of the server"s hostname. Allow cPanel users to create subdomains across accounts. 2. Login to customer's cpanel, and go to "Aliases" page. 3. Create an alias for "username.unique.ServerName.com". It says it works. However, if I go to the URL, then I see the generic page: http://username.unique.ServerName.com/cgi-sys/defaultwebpage.cgi So it seems the exact same problem happens, regardless of whether the subdomain is created in WHM using "Park a domain" page or the cpanel "Alias" page. Any ideas?
    0
  • electric
    I would try restarting Apache first. Perhaps the DNS entry was made but Apache did not restart after adding the ServerAlias.

    I tried restarting apache, but that did not make any difference. The problem continues with no change.
    Additionally running:
    grep -B1 username.unique.ServerHostname.com /etc/apache2/conf/httpd.conf
    Should produce something and should show ServerName theusersmaindomain.tld

    Yes, here is the output the command produces:
    root [/]# grep -B1 username.unique.ServerHostname.com /etc/apache2/conf/httpd.conf ServerName TheUsersMainDomain.tld ServerAlias username.unique.ServerHostname.com mail.TheUsersMainDomain.tld mail.username.unique.ServerHostname.com www.TheUsersMainDomain.tld www.username.unique.ServerHostname.com root [/]# _
    Does it matter that TheUsersMainDomain.tld is not currently pointing to our servers? (The customer has not changed the nameservers for this domain yet, so it still points to the old hosting provider.) Any ideas?
    0
  • sparek-3
    Is theusersmaindomain.tld using a dedicated IP? When theusersmaindomain.tld was set up, what IP address was it given in the New Account message? What IP address does username.unique.serverhostname.com resolve to? Is it the same IP address?
    0

Please sign in to leave a comment.