If type in browser ns1.mydomain.com/folder go to site

wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hello, (the subject not indicate very good but now I can't edit the subject :) )

In one VPS that I have, today I view (because I view that google have indexed) that, if I type in browser ns1.mydomain.com/folder and / or ns2.mydomain.com/folder then, go to the site and appears the site with this url (ns1 or ns2.domain.com/folder)
I check all dns entries, I don't view any for cause this.
If type ns1.domain.com go to ns1.domain.com/cgi-sys/defaultwebpage.cgi of cpanel website, this is correct.
But like indicate, if I type nsx.domain.com/folder (any folder of the site) go to site with the url nsx... and appears this url in the browser.

After search info in google, not view any about or equal like this.

The ns entries point to ip of server, and like indicate, if only type nsx.domain.com go to defaultwebpage.cgi (correct this) but if add to the url any subfolder go to subfolder and appears the url with nsx.

For me, I preferer not appears nsx or redirect like if we type https://ns1.domain.com that this redirect to the domain with: Website Domains Names & Hosting | Domain.com

Is this a issue in my VPS or some bad configured in dns?

Thanks and regards!
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,


If I'm understanding this properly when you go to nsx.domain.tld it redirects you to an actual site instead of the defaultwebpage?

IF this is the case what is present in the .htaccess file for domain.tld
 

wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hi,
No, not quite like that, perhaps I wanted to detail so much that I did not explain myself well.

If I go to nsx.domain.tld go to defaultwebpage (of cpanel, that this is correct).

Is when I go to nxs.domain.tld/folder (the website have a folders under public_html, but folders with content site, with index.php or html), for example:
nsx.domain.tld/forum/indedx.php or nsx.domain.tld/courses/index.html (I put the index.php and index.html but it is not necessary to write it in the browser).
In this cases, not go to defaultwebpage (of cpanel) go to site that I pointed and in the browser appears the url with nsx.domain.tld/folder

If you want, I can type a domain of one VPS that I have for view that I want explain.

Thanks and regards!
 

wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hi,
Yes, of course!
Attach a screenshot, I block out domains, but if you want, I can attach with domains.

If I type in the browser: nsx.domain.tld go to this page (is correct):




But if I type https://nsx.domain.tld go/redirect to the site (also, think is correct):



If I type nsx.domain.tld/folder go to 404 not found of cpanel web (I think correct also).


But, this is the "problem" for me, if I type: https://nsx.domain.tld/folder appears the site and with the url in browser with nsx:

other:


If you want, can attach screenshot without block out domains.

Thank you very much and best regards @cPanelLauren !
 
Last edited by a moderator:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Everything is correct behavior right up until the folders. If I was to go to https://ns1.mydomain.tld/folder I get a 404 because the folders don't exist - which sites are these folders related to? Or does this happen with any folder name you put in?
 

wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hi,
If I understand well:
If I was to go to https:ns1.mydomain.tld/folder I get a 404 because the folders don't exist, yes, I have this.

In my case, if I type any folder I put (folder that exist) go to the site/folder with the nsx.mydomain.tld.... in the browser

If I put any folder that don't exist, go to 404

In my last reply, when indicate go to 404 is when I type nsx.mydomain.tld (without https:// before) not for folders.

But like indicate, if I type nsx.mydomain.tld/folderx (folderx exist or some folder that exist) go to the content of this folder, and in the browser appears https://nsx.mydomain.tld/folderx

Google was indexed one site with nx.mydomain.tld, for this reasson I post this question here, I preferer not appears in the browser nsx.mydomain.tld/folder

The site that, are indexed by google with nsx have a redirect:
www.mydomain.tld to www.mydomain.tld/forum

And I view this, google (and analytics and adsense) are indexed nsx.mydomain.tld/forum . For this cause I was view this with nsx...

I hope I have been able to explain well :)

Regards!
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,

The issue I'm struggling to understand and what I'm trying to determine is why do your nameservers have folders/documentroot? These should just be A records. They should not be set up as a domain on the cPanel server.
 

wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hi @cPanelLauren
Yes, it comes to be as you say, my nameservers have (or can point) to folders/documentroot (documentroot = index.php or html).
But perhaps the word is not "have" but rather resolves / points / displays any folder under the "domain" nsx.domain.tld / folder and effectively, that is not a domain.

This is that I understand and know, these should just A records, not set up as a domain on the cPanel server.
In DNS Zone, the nsx records are only with A record (and AAAA por ipv6).

If you want, can attach screenshot of the DNS zone (hiding domain).

For me its very strange, I've been looking for information for days, trying to find out the cause, and I can't find it (and especially a site, I don't want to be indexed like this by google).

But, I don't know if they have something to do, because this is a question that I'm looking for information and I was going to expose it later in the forum, DNS zone of WHM and DNS zone of cPanel (of the same domain) are different, in cPanel have less records

Best regards.