Welcome to WebmasterWorld Guest from 18.208.186.19

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Add-on Domain Indexed As Subdomain of the Main Domain - How to fix it?

     
10:45 pm on May 25, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


Hi I have a big dillema. <My hosting provider> suddenly showed subdomain to google, and google bots indexed them. Now there is a big mess in search index, because everybody can see the I have all those subdomains by typing

site:example.com


So the subdomain urls look like this

subdomain.example.com

for example main domain is example.com anotehr domain on <my hosting account> is example2.com and it lies in the subfolder called example2

now Google somehow indexed example2.com pages twice like for example

1. example2.com/blog
2. example2.example.com/blog

So I have duplicate urls all of a sudden somehow.
So what to do ? How to fix this? What is the solution?

I tried in google webmaster tool to apply for removal of urls, but I cant use this kind of urls example2.example.com/blog, they are not accepted

[edited by: aakk9999 at 11:56 pm (utc) on May 25, 2014]
[edit reason] Exemplified [/edit]

1:00 am on May 26, 2014 (gmt 0)

Administrator

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

joined:Aug 10, 2004
posts:11870
votes: 245


welcome to WebmasterWorld, seojohny!


you need to add a hostname canonicalization redirect to your server configuration or to your application script.
what type of web server are you running?
if it's apache you need to look at using mod_rewrite directives.
there are many examples in the Apache Web Server [webmasterworld.com] forum.
5:18 am on May 26, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15934
votes: 887


I tried in google webmaster tool to apply for removal of urls, but I cant use this kind of urls example2.example.com/blog, they are not accepted

I believe the phrase you're groping for is Catch-22. You can only edit subdomain.example.com in wmt if you first register as owner of the subdomain, because it's considered a separate hostname. And you can only establish ownership if you allow google to find content, meaning that you have to put something there.

See you in the Apache forum ;)
6:50 am on May 28, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


What do you recommend to do, why is this happening at all, how can google find these links, I never used them in my life and now I have 400 bad links indexed, how to delete them from cache of search engines?
8:17 am on May 28, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15934
votes: 887


If you redirect everything to the preferred form of the hostname, the search-engine duplicates will presently go away even if you take no other action.
9:03 am on May 28, 2014 (gmt 0)

Administrator

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

joined:Aug 10, 2004
posts:11870
votes: 245


you need to add a hostname canonicalization redirect to your server configuration or to your application script.
9:29 am on May 28, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


you mean htaccess? Can somebody help me with it?

I changed the subdomain, so the links dont work anymore. But I need to make google reindex them again, any idea how? Is thee any program for it?
10:40 am on May 28, 2014 (gmt 0)

Senior Member from GB 

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

joined:Apr 30, 2008
posts:2630
votes: 191


I changed the subdomain, so the links dont work anymore. But I need to make google reindex them again, any idea how? Is thee any program for it?

Could you explain better what did you change and what do you want to reindex, using the following syntax:

example.com
example2.com/blog
example2.example.com/blog

Also, what is the end-result you want to achieve?
11:09 am on May 28, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


I renamed the subfolders where my site was, unassign the domain and assign it again to new folder name
so now the old sobdomain,domain.com do not work anymore

but there are like 400 old links that still show to previous pages

like pamelaanderson.girl.com and not pamelaanderson.com

so my old links that I want to reindex and delete from google and other search engines look like

pamelaanderson.girl.com/article1
pamelaanderson.girl.com/article2
pamelaanderson.girl.com/article3
pamelaanderson.girl.com/article4
pamelaanderson.girl.com/article5
etc......
I know I want to link from a site to get the bot to visit them again but I dont want to use any of my sites to do that, because that is bad for seo
11:21 am on May 28, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 27, 2003
posts: 1648
votes: 2


If googlebot has crawled them once, googlebot will crawl them again.
What you need to do is set it up so that when they do recrawl they get a clear instruction that 'this page is best visited at this address'.
There are a few ways of doing this.
* You can put a Canonical tag in the head block of the html of the page,
* You can issue a 301 header to the correct address when the 'wrong' page is called
and a couple of other techniques cf [support.google.com...]
But they all rely on the 'wrong' page existing, so gBot can grab it and learn what you want it to do, so you are going to have to recreate the error domain so it can be recrawled.
But figure out a technique that suits you for the diversion to the correct address first
6:27 pm on May 28, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15934
votes: 887


you mean htaccess? Can somebody help me with it?

Sure, but we won't write the code for you. If you need specific guidance, wander over to the Apache subforum and show what you've got so far.
12:35 am on May 29, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 27, 2003
posts: 1648
votes: 2


It was pointed out to me offline that the _cause_ of this problem hasnt been discussed here.
This is what I think happened:
In cPanel hosting, creating an Add-On Domain is a good way to get extra domains out of the one hosting package, if the host allows it.
However, when you create the Add On Domain, the suggested location (ie the default) is to put the content in a subfolder of the public_html folder.
This is poor practice because the OP's problem can occur: spiders can find the content in 2 places - at newdomain.com and at olddomain.com/newdomain/

If you are creating an add-on domain in cPanel, make sure you remove 'public_html' from the folder location so that the new domains content sits in a folder that is a 'sibling' to the public_html folder in the folder tree. I normally name this folder the domain name of the new site.
This will stop this duplicate problem from occuring, because there will be no second path to the website content.
It sounds like the OP didnt know this (we all learn the hard way :( ) and made this mistake.
12:41 am on May 29, 2014 (gmt 0)

Senior Member

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

joined:July 19, 2013
posts:1097
votes: 0


If you are creating an add-on domain in cPanel, make sure you remove 'public_html' from the folder location so that the new domains content sits in a folder that is a 'sibling' to the public_html folder in the folder tree. I normally name this folder the domain name of the new site.
This will stop this duplicate problem from occuring, because there will be no second path to the website content.

Absolutely great advice.

However, when you create the Add On Domain, the suggested location (ie the default) is to put the content in a subfolder of the public_html folder.
This is poor practice because the OP's problem can occur: spiders can find the content in 2 places - at newdomain.com and at olddomain.com/newdomain/

Definitely a flaw in cPanel I wish they would correct, but it's been that way for years, so I doubt they'll ever do it.
12:52 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


@leadergroot
THat is suer fine suggestion

can you elaborate in more details please?
So you are saying that I should just remove public_html folder? Or rename it?

Will that really work?
12:55 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


renaming public_html did not work, it made all my sites go offline
so I need to put my main domain called girls.com in subfolder of public_html?
12:57 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


Also I cant add girls in the subfolder of public:_html because it is primary domain and yes I have c panel so please tell me how you do this and explain in mor details please
12:58 am on May 29, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 27, 2003
posts: 1648
votes: 2


seojohny - public_html is where olddomain.com sits. Dont remove the physical folder!

At the same time you dont want newdomain.com associated with olddomain.com, so, when creating newdomain.com as an addon, dont take the cPanel default - dont put newdomain at public_html/newdomain, strip the public_html out of the text field where you specify where to put newdomain.com and nowhere else!
1:04 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


and that means it will be put above public_html?

I will call the domains main domain (girls.com)
subdomains(pamelaanderson.com)

so right now main domain sits in public_html and the subdomain sits in public_html/pamelaanderson folder

But I am sure you know that.
SO where to put subdomain? You have to write the path to subfolder when you use domain as addondomain
3:08 am on May 29, 2014 (gmt 0)

Senior Member

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

joined:July 19, 2013
posts:1097
votes: 0


The easiest way to change things is:

1.) FTP into the server and create a directory called pamelaanderson_com on the same level as public_html -- Basically, when you FTP in, you should see public_html in the directory list. Right there, add a directory (folder) called pamelaanderson_com

2.) After you do, go into the public_html directory, then the pamelaanderson.com directory and download all files from the current /public_html/pamelaanderson.com directory to your computer.

3.) When the download is finished, upload all the files you just downloaded from /public_html/pamelaanderson.com to /pamelaanderson_com

4.) Then go into cPanel and delete the pamelaanderson.com add-on domain and all files.

5.) As soon as the delete is finished, create the pamelaanderson.com subdomain again, but this time, rather than going with the cPanel default location, delete everything in the host-directory box [public_html/anything] and start to type pamela, by the time you get there, you should get a drop-down list or auto-fill in the box that includes the "pamelaanderson_com" directory you created and uploaded the files to from the original add-on -- Use that as the "host directory" rather than public_html/add-on-name [which cPanel suggested for some really bad reason] and you're done.
3:34 am on May 29, 2014 (gmt 0)

Senior Member from US 

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

joined:Nov 29, 2005
posts:10569
votes: 1124


JD_Toims is right. The following is a "picture" of what to do.

\allthatstuff\public_html\addon

... is what caused the problem. What you want is...

\allthatstuff\public_html
\allthatstuff\addon

Being at the same directory level they are SEPARATE and cannot be accidentally indexed together.

Let us know how it works out!
3:47 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


YES that will work, I need to test it

can I just move the folder of pamelaanderson to one step above, so it will be next to public_html, unassign the domain, and assign it again?
3:57 am on May 29, 2014 (gmt 0)

Senior Member

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

joined:July 19, 2013
posts:1097
votes: 0


can I just move the folder of pamelaanderson to one step above, so it will be next to public_html, unassign the domain, and assign it again?

AFAIK, yes, you should be able to it that way too.

I guess I should have said "safest way I've tested to have a site offline for a minute or less", rather than easiest.
3:59 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


no this does not work, you can not assign the addon domain to the folder that is on the same level as public html

when you try to do addon, it asks you for folder name, that is like
public_html/.......

or you can select the already created directory

tha is the point of public html, stuff on the same level is not reachable to public, I just am thinking did you even try this youself?
4:01 am on May 29, 2014 (gmt 0)

Senior Member

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

joined:July 19, 2013
posts:1097
votes: 0


I do what I said [with the exception of downloading/uploading, since I set them this way from the start] every single time I add-on a domain in a cPanel account and have for years -- I know it works and I know /add-on is as secure as /public_html, without question.
4:06 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


maybr you have different c panel that I do. I host on bluehost,
4:06 am on May 29, 2014 (gmt 0)

Senior Member from US 

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

joined:Nov 29, 2005
posts:10569
votes: 1124


try deleting public_html and replacing with the addon name. It should work! However, if ti does not, contact your host server and request it (if they won't charge you as a new account). They may have their server configured to prevent this.
4:12 am on May 29, 2014 (gmt 0)

Senior Member

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

joined:July 19, 2013
posts:1097
votes: 0


You don't delete public_html -- It hosts your main site.

Read through what I said again. I didn't ever say to delete public_html. I said to delete the add-on domain's directory cPanel creates within public_html, after you download the add-on domain's contents and re-upload the contents to /add-on on the same level as public_html.
4:19 am on May 29, 2014 (gmt 0)

Senior Member from US 

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

joined:Nov 29, 2005
posts:10569
votes: 1124


Then we all might be confused. It has worked for me in the past, but then again, those were servers I had under my control and to the configs as well. However, we're still ended up at the same place, right? Otherwise it will always be a folder below and thus can be found and indexed as part of the top level domain unless there's htaccess rules etc in place.

/1/2/addon
/1/addon
4:24 am on May 29, 2014 (gmt 0)

New User

5+ Year Member

joined:May 25, 2014
posts: 15
votes: 0


This does not work, the addon domain folder needs to be inside publichtml, at least on bluhost, I have shared hosting, maybe that is the reason
4:38 am on May 29, 2014 (gmt 0)

Senior Member

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

joined:July 19, 2013
posts:1097
votes: 0


Maybe bluhost is different, but I've had multiple cPanel accounts and worked with a number of clients with cPanel accounts and have always been able to move the add-on domain's root directory to the same level as public_html -- If you can create a directory on the same level as public_html, you can set the add-on domain's root-directory to that directory rather than public_html in every case I've ever seen.
This 37 message thread spans 2 pages: 37