Welcome to WebmasterWorld Guest from

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Shared hosting subdirectory indexed, domain pages deindexed

2:39 pm on Sep 21, 2016 (gmt 0)

New User

joined:Sept 21, 2016
votes: 0

I have several domains which run off a shared hosting account. From the root directory (rootdomain.com), they appear as folders (ie. /domain1, /domain2), which the domains point to. For years the pages on the domains were indexed under their respective domain names (ie. domain1.com, domain2.com). In late August, Google indexed almost all of the pages from domain1.com from the rootdomain and deindexed the domain1.com pages. Meaning it shows up as rootdomain/domain1/page.htm instead of domain1.com/page.htm

This is a small, 30 page website that operated normally for years, now only 4 pages are indexed under the domain name. Has anyone experienced this problem before and is there any tips to fix it? Perhaps a 301 redirect? Wait longer and do nothing? I don't know what to do. The pages still rank similarly.

Thank you.
11:03 am on Sept 24, 2016 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Apr 30, 2008
votes: 191

Welcome to WebmasterWorld, fv44!

What you are refering to are "add-on" domains and they could cause this kind of problems as the content of add-on domain can be accessed through the main domain URL structure unless redirects are implemented.

Google has for some reason decided that the rootdomain/domain1/page.htm is a stronger page and should be ranked instead of domain1/page.htm

Have you got canonicals on your add-on domains? If you do, when you view the source of URL rootdomain/domain1/page.htm what does the canonical say? Is it rootdomain/domain1/page.htm or does it say domain1/page.htm ? (Unfortunately it could be the first version if canonical is generated automatically - in which case canonical does not really help).

The best way to solve this is to implement 301 redirect from rootdomain/domain1/page.htm to domain1/page.htm. When implementing these redirects, make sure that www/non-www version is also handled correctly to always redirect to the version of your choice.
12:49 pm on Sept 24, 2016 (gmt 0)

Junior Member from CA 

10+ Year Member Top Contributors Of The Month

joined:Oct 1, 2002
posts: 151
votes: 14

I had a similar issue around the same time period on a dedicated server, just one link to a site of mine I came across that alerted me to the issue. Had my server guy check and it was something to do with DNS and Bind by memory. Sorry I can't help more as I can't recall exactly what the fix was - and I'm not too techie. It fixed the problem though.
10:39 pm on Sept 25, 2016 (gmt 0)

New User

joined:Sept 21, 2016
votes: 0

Thank you very much for your replies. aakk9999 - Your answer was very helpful in helping me frame and research the question (ie. add on domain) and informing me of the canonical tag. I had no canonicals set at all. I decided I would set the rel-canonicals first for each page to see if that resolves the issue. Despite what Search Console says in terms of how many pages are indexed (which is obviously a snapshot of the past), all of my 30 pages show under a site: search for both the root domain and the add on domain. If the canonical tag does not solve the issue, I will try the 301 redirect. I tried the 301 redirect on a page but it resulted in an infinite loop so clearly I need to research it more. I am just sort of nervous to make a big change as the pages rank well.

Any idea on how long it would generally take or a rel-canonical to work (if it were to work here)?
5:49 am on Sept 26, 2016 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
votes: 410

Out of curiosity, are you using cPanel? This sounds like a type of error which I gather is pretty common with cPanel hosting.
12:25 am on Sept 27, 2016 (gmt 0)

New User

joined:Sept 21, 2016
votes: 0

It is Linux hosting. I also have a cPanel account with the same hosting provider with no issues for its several add on domains along with several other domains on the 'problem' Linux account with currently no issues. I did notice that many of the other domains on the Linux hosting (where the problem occurred) were previously double indexed as well but Google seemed to correct this on their own (without any statistical differences in Search Console). One website, the one I am writing about, remained double indexed upon a site: search but search console (so far) indicates only 6 pages are still indexed (out of 30) despite what the site: search currently shows. More problematically, the root domain version is what they are mostly showing in the search results.
7:51 am on Sept 27, 2016 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
votes: 410

fv44, I'd tend to go with the 301 redirect as aakk9999 suggests. The canonical tag is implemented by the search engine, not by your server, so IMO there's more chance it might not work.

Variants of the "double indexing" problem you mention pop up frequently in discussions about cPanel, not always exactly as you describe. As I understand it, and I'd appreciate feedback, it's got to do with the way add-on domains or additional hostnames are set up using subfolders or subdomains of the folder for your main domain, and the multiple ways this content can be viewed. Some say that as long as you don't have a link pointing to the wrong version you're OK, but that's perhaps true of any canonicalization issue.

I'm not an Apache programmer... but, also, as I understand it, because of the way cPanel is programmed, doing a proper 301 redirect on Apache using mod_rewrite can have its own set of complications.

Here are several threads on the topic I've had bookmarked which will point out some of the issues. You may need to discuss them further either here, or in our Apache Web Server forum [webmasterworld.com...]

From this first thread, I'll quote the initial part of the answer by jdMorgan, the original moderator of our Apache forum, and one of the deans of Apache programming...

Multiple Redirects For Same Page
Found pages that were being redirected 2 times
May 2006
https://www.webmasterworld.com/forum92/6283.htm [webmasterworld.com]

The basic problem is that by using cpanel to 'write' the code, you cannot control the order in which the redirect directives are added, or what order they execute in.

If you use mod_rewrite for the per-page redirects in .htaccess, and place them above the domain redirect, then your problem will disappear. To emphasize: You must use mod_rewrite for all redirects; If you mix mod_alias and mod_rewrite directives, then --in a normal server configuration-- the mod_alias directives will all execute first. Because mod_rewrite is *required* if you want to do conditional rewrites/redirects, this establishes the need to use mod_rewrite for all redirects....


This thread suggests a range of different approaches, with various opinions about urgency, though none of the approaches except mod_rewrite, I think, that will fix a problem once an unwanted variant is linked to....

Add-on Domains - can also be accessed as subdomains
May 31, 2011
https://www.webmasterworld.com/google/4319903.htm [webmasterworld.com]


And a more recent thread, which also includes a number of approaches...

Add-on Domain Indexed As Subdomain of the Main Domain - How to fix it?
May 2014
https://www.webmasterworld.com/google/4674394.htm [webmasterworld.com]

phranque mentions several times in the thread...
you always need a hostname canonicalization redirect.

I think there's no one answer about how long it would take the rel=canonical tag to work... depends on how often Google revisits your site, etc. If you use the rel-canonical, please let us know if it works.