• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Wildcard / Catchall Subdomains. How do i make them ?

A

Abdullah.Ahmed

Guest
I want to create a wildcard subdomain where
if the user types a subdomain which i have not created like asdasdhkjq1.mydomain.com then he /she gets redirected to the main page (mydomain.com/default.aspx)

However i still wanna make it so that the url remains asdasdhkjq1.mydomain.com in the address bar.

I tried making a A record like this

A * xxx.xxx.xxx.xxx but it shows a plesk page saying no domain have been setup on this address or something.

Anyhelp ?
 
Let me be more specific.

I setup an A record via plesk such as this.

*.dilchasp.com. A 64.61.14.109

that IP is exclusively used by my site. So i was hoping to have all subdomains go to the same page (dilchasp.com/default.aspx) where i can then access the url and do the magic on it.

However that does not seem to work. It takes me to a default plesk page (eg http://sldkjajds.dilchasp.com).

Is there anyway to make that record point to a proper site ? Do i need to configure IIS for that ?
 
First of all:
1. Host Names (or 'labels' in DNS jargon) were traditionally defined by RFC 952 and RFC 1123 and may be composed of the following valid characters.
A to Z ; upper case characters
a to z ; lower case characters
0 to 9 ; numeric characters 0 to 9
- ; dash
Therefore you A record is simply ignored
2. Just make site you want all users to be redirected default for that IP (Plesk CP->Server->IP addresses->on IP address row click host and select default site for that IP)
3. On another IPs you can also set default site and create redirection to your desired site

John S.G.
 
Back
Top