• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Wildcard DNS (virtual subdomain) and domain alias

J

JHB Oosterlaar

Guest
Hi,

We are developing a website that supports multiple languages and is basically a 'network' of subdomains.

This 'network' of subdomains is supported by implementing wildcard DNS and the multiple languages are based on a domain alias implementation, where the selection of the language to offer is based on the top level domain.

Both implementations work individually as expected, but together they don't seem to go hand in hand. The request fails, when I request a page within a virtual subdomain through a domain that is set up as an alias. The webserver return the message that the page does not exsist.

How can I make this work? How can I let the webserver know, that it needs to 'alias' the virtual subdomains, as well?

Thanks very much in advance!

Kind regards,

Jeroen Oosterlaar
 
Put ServerAlias *.domain.com in the domain's webserver config (using a vhost.conf file).
 
Originally posted by breun
Put ServerAlias *.domain.com in the domain's webserver config (using a vhost.conf file).

I already did that and the wildcard DNS implementation works fine by itself. However, it fails in the combination with the domain alias.

Please note the following example.

There are two domains:
1. thedomain.nl
2. thedomain.com

Thedomain.nl is the main 'platform' on which the websoftware runs. Thedomain.com is set up as a domain alias for thedomain.nl, so every request to thedomain.com is redirected to thedomain.nl. Based on the top level domain, the software offers the content in a specific language (.nl -> Dutch / .com -> English). This works perfectly.

Furthermore, some components of the website (structure) have their own subdomains:

For example:
1. sub1.thedomain.nl (sub1.thedomain.com)
2. sub2.thedomain.nl (sub2.thedomain.com)
3. sub3.thedomain.nl (sub3.thedomain.com)

I have used wildcard DNS to redirect all subdomain requests to thedomain.nl. Again, this works fine.

However, a request results in a 'page not found' error, when it is send to a subdomain of the domain alias, for example sub2.thedomain.com. So, apparently, the (web)server cannot succefully redirect the request to thedomain.nl, as the combination of the wildcard DNS and domain alias fails.
 
I have solved it :). I had to add a line to the vhost.conf file of thedomain.nl. Now, this file contains the following two lines:

ServerAlias *.thedomain.nl
ServerAlias *.thedomain.com
 
Back
Top