Subdomain with www not work

attila729

Active member
Oct 11, 2019
117
29
28
Hi Guys,

I have a subdomain created by cpanel, if you write subdomain.it it work,
but if you write www.subdomain.it , it do not work
this is the error:

Unable to reach the site Unable to find the IP assistance of the server of www.subdomain.it.
Try to run the Windows Network Diagnostic tool.
DNS_PROBE_FINISHED_NXDOMAIN




I tried to put in DNS



www.subdomain.it.1400INCNAMEsubdomain.it


but don't work.

I try to add with DNS CNAME, that you see up, also a new subdomain www.subdomain.it for put redirect to subdomain.it
but when i try to create www.subdomain.it,
this message is shown:

There was a problem creating the subdomain:
(XID ffcegr) (XID bu3zm7) A DNS entry for the domain “subdomain.it” already exists. at /usr/local/cpanel/Cpanel/Admin/Modules/Cpanel/subdomain.pm line 176.

Someone can help me?


thanks
 
Last edited:

raymondreddington

Member
Trusted Uploader
Mar 28, 2020
73
38
18
Hi bro!

I'm not an expert but I think it is related to the htaccess file.

Try adding this in the .htaccess file :

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]


It should work! In bocca al lupo!
 

attila729

Active member
Oct 11, 2019
117
29
28
Hi bro!

I'm not an expert but I think it is related to the htaccess file.

Try adding this in the .htaccess file :

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]


It should work! In bocca al lupo!

Hi dear,

i tried but don't work :cry:

great In bocca al lupo! do u speak italian?
 
  • Like
Reactions: justanothermember

tradesman

Well-known member
Mar 9, 2020
367
225
63
Cold North
I have a subdomain created by cpanel, if you write subdomain.it it work,
but if you write www.subdomain.it , it do not work

I'm not sure if I understand you correctly. You want to add a www to a subdomain?

You can't because "www" is already a subdomain.

the basic structure of url is:

subdomain.domain.domain-extension

like:

www.bellaciao.com or bella.ciao.com

You can't do: www.bella.ciao.com


But If you're adding a "www" to your domain "bellaciao.com" then
raymondreddington's suggestion should work.



Delete the CNAME Entry in your DNS because it's already declared there. What you need is a redirect [301] to your www address. and raymond just gave you the code.

What could help is some info on your .htaccess file if you're comfortable with it.

or just try again with this:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

what it does is it checks for a condition !(not) ^(start) with www then redirect to (.*) anything -> then follows a redirect to your domain. That's whats the 301 for.

You will be able to fix this issue, I've seen this before. The real problem is SEO, your site will be indexed by Google twice from 2 addresses, penalties.

Goodluck, bro.
 
Last edited:

drug

Member
Jan 11, 2019
56
49
18
well, if you didnt found a solution yet, you can add ww to subdomain like this.
Select CNAME
on name type the SUBDOMAIN only, if you have sub.domain.com, on NAME field just put SUB.
And thats it.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu