Jump to content

Subdomain HELP!

patriotaki

Hello All,

 

I am having trouble making my subdomain point to the correct IP.

 

Lets say i have a domain "example.com" which points to 1.2.3.4

What I want to achieve is point my subdomain "sub.example.com" to a different IP e.g 5.6.7.8 . I have successfully done that by pointing the A record of "sub" to the new IP (5.6.7.8).

BUT the problem is that the www.sub.example.com does not point to 5.6.7.8. Is it possible to have the "example.com" and "www.example.com" point to 1.2.3.4 and "sub.example.com" & "www.sub.example.com" point to 5.6.7.8

I have also added an A record "www.sub" to point to 5.6.7.8 but that did not work.

 

Any ideas?

Link to comment
Share on other sites

Link to post
Share on other sites

You either need an additional A record for your sub-subdomain

www.sub.example.com A 5.6.7.8

or you need to use a wildcard A record

*.sub.example.com A 5.6.7.8

if your DNS provider supports that. In that case you'd then e.g. have an appropriate virtual host on your web server that takes care of serving the appropriate page.

 

Just be aware that e.g. a wildcard SSL certificate (*.example.com) is not valid for sub-subdomains, so it will not work for www.sub.example.com, only sub.example.com.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Eigenvektor said:

You either need an additional A record for your sub-subdomain


www.sub.example.com A 5.6.7.8

or you need to use a wildcard A record


*.sub.example.com A 5.6.7.8

if your DNS provider supports that. In that case you'd then e.g. have an appropriate virtual host on your web server that takes care of serving the appropriate page.

 

Just be aware that e.g. a wildcard SSL certificate (*.example.com) is not valid for sub-subdomains, so it will not work for www.sub.example.com, only sub.example.com.

Thank you, that helped!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×