Making WWW. work for subdomain with no hosting?

Making WWW. work for subdomain with no hosting? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Making WWW. work for subdomain with no hosting? error on your web browser. Problem :


We have a domain, example.com for instance. In our DNS settings for this domain, we've created a forward for give.example.com subdomain to redirect to another website which works great. (It's basically just an A record with give as the host and the IP of the site we're redirecting to as the value).


However, if you try www.give.example.com, it does not work. I've read that you can add a CNAME record to remedy this, but I can't figure out exactly what I need to add.


Solution :

www.give.example.com is exactly like give.example.com in the DNS, but they are separate names, so once you put a record for give.example.com that says nothing for www.give.example.com (except in cases of delegations, which is not the case here).


So you need records for both, such as in your zonefile (or equivalent in any provider UI or API):


give A 192.0.2.42
www.give A 192.0.2.42

(you can use separate IP addresses as well, of course).


You can use a CNAME if you prefer (and want/need the same IP address anyway for both), in any direction:


give A 192.0.2.42
www.give CNAME give

or


give CNAME www.give
www.give A 192.0.2.42

All names are written in relative fashion, so could work for any zone. If you need absolute names, remember to tackle .example.com. (including final dot) to every names above.


We hope that this article has helped you resolve the domains, redirects, dns error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Post a Comment

Popular posts from this blog

How do I redirect traffic only if being accessed from a specific port?

DNS entry to redirect constant url to changing directory name

How to redirect to any domain [duplicate]