Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subdomains not working when www is added?

Tags:

subdomain

dns

I have purchased My Domain name from one registrar & hosted in another hosting company. I have created a sub domain from my hosting domain manager lie http://subdomain.domain.com and it works fine. But when someone types in www.subdomain.domain.com the site is not working.

Do I need to make changes in my DNS Manager of hosting CPanel or DNS Manager of my Domain CPanel?

Also What all Records I need to add ( like A Record or CNAME) to redirect www.subdomain.domain.com to subdomain.domain.com.

I don't want to see www for my subdomain, but only wants to get redirected to subdomain.domain.com.

like image 415
SEOFuGenX Avatar asked Nov 28 '11 12:11

SEOFuGenX


People also ask

Do subdomains work with www?

Overview. Generally, the www prefix is not used when using subdomains. If you want to use the prefix with your subdomain, you can make a vhost file and add this behavior as part of your domain configuration.

Why my subdomains are not working?

The general cause of a subdomain on Cloudflare not working on a site is that you haven't added it in your zone file for the domain.

Does www count as a subdomain?

So, www is a subdomain of your domain, which itself is a subdomain. The www can also be called a third level domain, since it is one level below your second level domain.

Why does adding www not work?

If you're currently facing issues when trying to reach your website with www , while your root domain is working, make sure that there is a properly set up record for the host www on your domain's DNS zone. Just follow the steps depending on where your domain is pointing: Domain pointing to Hostinger.


1 Answers

It doesn't work because www.subdomain.domain.com doesn't exist. You have to add a CNAME record in your zone subdomain.domain.com the same way you've added the host subdomain to domain.com.

like image 163
tomferon Avatar answered Jan 02 '23 06:01

tomferon