david_php
asked on
Subdomain Problem
Hello,
I had problem with my one of domain.
Say for eg domain is www.abc.com. And i had created 4 new subdomain for this.
Now when i try to open this 4 domain, its working fine. But when i try to open subdomain which is not created, then its opening the main domain . i m not getting 404 msg.
How can i restrict this via htaccess or anything. ?
I had problem with my one of domain.
Say for eg domain is www.abc.com. And i had created 4 new subdomain for this.
Now when i try to open this 4 domain, its working fine. But when i try to open subdomain which is not created, then its opening the main domain . i m not getting 404 msg.
How can i restrict this via htaccess or anything. ?
From the symptoms you are describing your dns is setup to reslove non existant sub domains to the main ip address. You need to either change the setup of the dns so that it does not resolve non existant sub domains or counfigure you web server to inspect the host headder for the requests and respond accordingly. If you use the first option I would expect you to get a browser error saying the website was not reachable if you use the second option I would expect you to see a 400 error (not 404 page not found error)
Also remember that you will need to set up separate records in Apache's virtualhosts for each subdomain so that when the DNS routes traffic to the server then Apache routes that traffic to the correct subdomain.
ASKER
Right now for every subdomain , there are two A records
au A xxx.xxx.xxx.xxx
www.au A xxx.xxx.xxx.xxx
For main domain also there is two A records.
How can i set the parameter to stop this
au A xxx.xxx.xxx.xxx
www.au A xxx.xxx.xxx.xxx
For main domain also there is two A records.
How can i set the parameter to stop this
What DNS Server / Service are you using?
ASKER
i m using DIRECT ADMIN
If you ping or dig the subdomains what IP is returned?
ASKER
its the main ip
You might have the wild-card sub-domain (*) pointed at your main domain (@) in your DNS settings.
ASKER
yeah i had got the wildcard SSL.
Is it creating problem??
Is it creating problem??
well, if you have * entry in your DNS zone that means your are accepting any sub-domain at the DNS resolution stage. SSL doesn't play any role here, however if your wild-card SSL forces you to have the * entry in DNS, you can handle them in your web server configuration.
ASKER
in dns mangagement there is no such entry for * ..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear Moderator,
I want to ask a new question but i'm not able to do it, your system saying my this question will be closed on 9th May, 2011. and then I can add new question.
Please let me know how can I add new question right now, its very important.
Thanks,
Raj
I want to ask a new question but i'm not able to do it, your system saying my this question will be closed on 9th May, 2011. and then I can add new question.
Please let me know how can I add new question right now, its very important.
Thanks,
Raj
ASKER
done