Krasimir Vatchinsky

Registered
Jun 23, 2018
3
0
76
New York
cPanel Access Level
Root Administrator
Hello, I'm having this problem recently after the latest WHM/cPanel version updates with the landing page i have on my server for hosted parked domains.

Originally I designated a Host domain for that park hosting and set account in WHM/cPanel with landing page uploaded under cPanel account of the Host domain

When I park the client domain to that Host account on WHM level, the parked domain after typing it in the url was continuing to display, so I used a javascript to get that and displayed in the web page with text, this is HOST domain server where the client domain (the actual domain name taken from the javascript from the typed URL) was displayed as well is parked.

Now after the latest WHM/cPanel version updates, all parked domains are directly forwarded to the HOST domain or as described in the WHM/cPanel documentation:

"
A parked domain (or alias) is a secondary domain that points to the user’s primary domain. When users access the parked domain's website, the primary website displays instead.

For example, cpanel.com is a parked domain that points to The Hosting Platform of Choice | cPanel, Inc.. When you access The Hosting Platform of Choice | cPanel, Inc., the The Hosting Platform of Choice | cPanel, Inc. website displays. "

I don't want that. I need the entered parked domain in the url to continue to stay there even the page that is loaded will be the Host landing page, and I don't want to open account for every parked domain either.

Could some one give me advise how that can be done, either through WHM/cPanel or .htaccess file?

Thank you!
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
472
113
UK
cPanel Access Level
Root Administrator
You could try and make them an Addon Domain, give them their own document root folder, do not redirect anywhere, and place your landing pages in that folder.
 

Krasimir Vatchinsky

Registered
Jun 23, 2018
3
0
76
New York
cPanel Access Level
Root Administrator
You could try and make them an Addon Domain, give them their own document root folder, do not redirect anywhere, and place your landing pages in that folder.
Thank you rpvw, unfortunately that would be not very efficient in my case we are domain reseller, and host over 10 000 domains, the parked domains are very substantial number, the cost of maintaining multiple landing pages is not something Im looking for, the previous version of WHM/cPanel allowed when park domain in WHM to be able to display it on host domain page without forwarding. I do look for some work around most likely with .htaccess file I guess
 

Krasimir Vatchinsky

Registered
Jun 23, 2018
3
0
76
New York
cPanel Access Level
Root Administrator
Hello everyone, I found solution by setting the following in .htaccess file, on the host domain account, now all is working fine:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?(hostdomain)$
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST} [L,R=301]

Thank you!