*.domain.com

Hello,

To create a wildcard subdomain, you'll need to do the following:

1) Create a wildcard DNS to resolve all subdomains:
User Level -> DNS Control -> add an A record:

* A 1.2.3.4

where 1.2.3.4 is your websites IP adresss.

2) Tell apace how to handle the wildcard:
Admin Level -> Custom httpd.conf configuration -> domain.com. Insert the following into the top text area:
Code:
ServerAlias *.|DOMAIN|
then click "Save".

Wait for several minutes before trying it (else you might cache a non-existant record for 4 hours).

*NOTE: doing this will override all of your existing subdomains. They will all point to your main domain's document root.

John
 
Instead of doing it in the custom virtual host in DA, you can also update apache's httpd.conf manually (don't forget to first add an A record to you're DNS like John said):
Edit the httpd.conf, in my case:
Code:
nano /etc/httpd/conf/httpd.conf
and add the following lines at the end of the document:
Code:
<VirtualHost xx.xx.xx.xx>#youre'r IP address
        ServerName *.domain.com
        ServerAlias *.domain.com
        DocumentRoot /home/username/domains/domain.com/public_html
</VirtualHost>
This way you're normal subdomains wil still work.
 
Hello all,

This is my first post here and sorry for asking a real newbie question, but I am unable to locate the "DNS Menu" icon to access the DNS settings, which a post above indicates it's at: User Level -> DNS Control

TYIA for help with this.
 
Hi, wildcard subdomain need both methods? I mean; DNS panel and apache config? :)

I ask because my DNS isn't accept *.domain.com. and said "invalid name" :confused:

And in my hosting service I dont have access to apache config! :( :(
 
For dns, you'd just add an A record:

* A 1.2.3.4


But yes, you'd also need access to the Admin Level httpd.conf customizations.

John
 
DirectAdmin Support said:
For dns, you'd just add an A record:

* A 1.2.3.4


But yes, you'd also need access to the Admin Level httpd.conf customizations.

John

Tks John but Netfirms don't leave me try that! See next screen of domain panel:


And * A 1.2.3.4
Said: invalid subdomain.
:confused:

Please help me!
 
Hello,

For that screenshot, you'd want
1) Enter a subdomain: *
2) Enter IP address: 1.2.3.4 (for your actual IP)
3) click.

If it doesn't accept * as an A record, then you'd need to whine and complain to them to accept wildcards ;)

Joh
 
I'm going to dead.
Hello SidV,

Thank you for replying.

Unfortunately, wildcard is not supported at the moment. It has been added to our list of client requested features and may be included in a future service upgrade. Thank-you for your suggestion.


Tutorials, demos, and answers to over 90% of your questions may also be found immediately at our Self-Help Support Centre: http://www.netfirms.com/support/

Regards,

Lucy

Thats so bad....

But I still fighting...
I sign in to dnsexit.com
And now I have wildcards; I added an A record, but if you go to http://whatever.mydomain.com you'll see the root of my server, NOT my website!!!???
How can I fix that? :confused:
 
All DNS does is assign IP#s to domain names.

When a site visitor types a domain name into his/her browser it gets converted to an IP# and reaches your server by that IP#.

Once Apache gets the packets from your visitor it can determine from the headers which site your user is trying to see.

But it doesn't know what to do with that site name unless you enter it as an ServerAlias in the domain-specific httpd.conf file.

The two ways to do that in DirectAdmin are as the domain user by creating a site alias in the control panel, and as admin by creating a custom line in the httpd configuration for the user.

Jeff
 
This wildcard thing doesn't work for domain-pointers :(
Only for the 'main'-domain.
Is this a bug?
Will this be fixed?
 
Use registrar's DNS instread of Hosting's DNS, then all done.

Note: Before switch the dns, write down your current DNS records for reference.
 
Back
Top