SEOFuGenX
SEOFuGenX

Reputation: 211

Subdomains not working when www is added?

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.

Upvotes: 21

Views: 61144

Answers (7)

Jai Kashyap
Jai Kashyap

Reputation: 25

to add prefix(www) on subdomain you need to add DNS record as follow:

Type: A Name: www.subdomain // do not include your domain name, only www + subdomain Point to: IP address TTL: Default

Upvotes: 1

Sher Singh
Sher Singh

Reputation: 545

If you want to add "www" in the subdomain then create the same configuration subdomain and add "www" in that domain.

you required to add both domains name www.subdomain.domain.com and subdomain.domain.com enter image description here

Upvotes: 0

francis
francis

Reputation: 31

This helped me out. I hope it helps anyone going through the same thing.

Yes, as you said CNAME record www for customer1.mysite.com will report an error. To make it working, you should be able to add CNAME record www.customer1 for mysite.com instead of www for customer1.mysite.com - xMudrii https://www.digitalocean.com/community/questions/how-to-configure-subdomains-to-use-www-and-non-www

Upvotes: 3

goldcode
goldcode

Reputation: 673

Say you have a website www.example.com and you want to have a working link like www.service.example.com, then you need to enter the subdomain name www.service (and not service) while setting up the sub-domain.

Preferably set up both sub-domains i.e. www.service and service for users who type in www.service.example.com and service.example.com on their browsers.

Upvotes: -1

Create CNAME as sub.domain.

Point to @ where sub.domain is your subdomain name and maindomain name.

Upvotes: 0

tomferon
tomferon

Reputation: 5001

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.

Upvotes: 14

Oded
Oded

Reputation: 499382

You need to register that subdomin too.

Yes - www.subdomain.domain.com is a subdomin of subdomain.domain.com. There is nothing special about the www prefix, as far as the domain system or browsers are concerned.

Upvotes: 11

Related Questions