I have a domain name abc.mydomain.com
This is a https URL ( http redirects to the https version )
However, I now need to be able to handle http://www.abc.mydomain.com to redirect to abc.mydomain.com
How can I do this? is it a webserver level redirect or something to be done at the DNS resolution.
I know my URL already has the “abc” as its sub-domain and I dont need a “www”, however, we noticed that “www.news.google.com” resolves to “news.google.com” – hence wondering if I can achieve it too
Thank you!
In short, yes.
DNS works on a hierarchy – the DNS server for .com can delegate down to the nameserver for your domain which can delegate further, or just answer the requests, which needs to be your first step.
If you use Bind style zone files, you can do something like (where
123.45.67.89is your webserver IP address):Then, you also need your webserver to resolve that to the right virtual host/redirect as desired.