• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

domain aliases not working properly

M

mcalthrop

Guest
Hi,

I'm having trouble getting domain aliases to work properly.

Here are the steps I take:

1 - Create a hosting account for example.com (but I do NOT check the box that says WWW next to "Domain Name")
2 - Add a subdomain "www". NOTE: this is essential to the running of the CMS that I have written, so it's not possible to just check the WWW box on account creation.
3 - Create a domain alias alias.com .

Now here's what happens:
(a) www.example.com works fine
(b) example.com works fine
(c) alias.com works fine
(d) www.alias.com does NOT work

I've tried adding www.alias.com as a domain alias, but I get a Plesk error ("Error: Unable to set up the domain alias www.alias.com because a DNS record pointing to the host www.alias.com already exists.").

To a workaround: it took me ages to find, but I discovered what the docroot is under circumstance (d) above: it's the docroot of the domain that is used as the nameserver in plesk:

/var/www/vhosts/<nameserver.com>/httpdocs

So as an interim fix, I've put an index.php file in that folder that contains a massive switch statement to check the server name ($_SERVER["HTTP_HOST"]), and forward it to the required domain alias where possible.

This is a workaround, but really not sustainable: every time I add a domain alias via Plesk, I have to update the above file as well.

Can anyone help?

Matt
 
Surely *someone* out there has had similar problems?!

Matt
 
Same thing

I'm having the same problem for one domain. I checked all the DNS, aliases and dns settings and couldn't find a duplicate.

I'm on ver 8.4 linux
 
glad there's someone else out there with the same problems... still noone else who knows about this?

Matt
 
Solution Found

I found a solution. Lame bug in the system

If you add a domain alias (eg: domain.com) and then try to add another domain alias "www.domain.com" you'll get that error message "Unable to set up the domain alias domain because a DNS record pointing to the host domain already exists"

Delete the alias "domain.com" and then FIRST create "www.domain.com" THEN add "domain.com"
 
I found a solution. Lame bug in the system

If you add a domain alias (eg: domain.com) and then try to add another domain alias "www.domain.com" you'll get that error message "Unable to set up the domain alias domain because a DNS record pointing to the host domain already exists"

Delete the alias "domain.com" and then FIRST create "www.domain.com" THEN add "domain.com"

Thanks a lot!
This information is very helpful for me.


Related information with this Case
 
Back
Top