Mobile app version of vmapp.org
Login or Join
Megan663

: My site indexed with my another domain in google My site is indexed with my another domains, all of the domain are hosted in same hosting. When I search with site:me.example.com it indexed

@Megan663

Posted in: #Google #Indexing #Serps

My site is indexed with my another domains, all of the domain are hosted in same hosting.

When I search with site:me.example.com it indexed the another domain like this me.example.com/site1.example.com. How do I handle this situation?

Note: I have 5 websites in same hosting, when I search with site:me.example.com it shows all the websites in suffix like the below example:


me.example.com/site1.example.com
me.example.com/site2.example.com
me.example.com/site3.example.com
me.example.com/site4.example.com

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Megan663

2 Comments

Sorted by latest first Latest Oldest Best

 

@Becky754

I think that you may have created your sites using a control panel. I say that because many of them have more than one way to create a site, one of which appears to be exactly what you have. It is a confusing mish-mash of site and user sites where one site was created first and the others were created using the same username later. This in of itself is not wrong, but there are two options with this where one creates user sites under the parent site which I think is what happened here. I would not worry about the details of this just yet. I would suggest that you familiarize yourself with the control panel for the future.

The good news is that there is an answer!

While I cannot look into a crystal ball and know exactly what has happened and what your configuration looks like, I am pretty sure I can tell you what your configuration should look like.

In the directory /etc/apache2/sites-available or /etc/local/apache2/sites-available, you will find configuration files with file names something like domainname.tld.conf. You will want to edit each of these. I suspect that there is overlap in the DocumentRoot and Directory directives between your configuration files. You do not want overlap in this- not for what you have described.

You should see something like this:

<VirtualHost *:80>
ServerName mydomain.com
ServerAlias mydomain.com DocumentRoot /home/mydomain.com/www
AddHandler cgi-script .php
DirectoryIndex index.html
<Directory /home/mydomain.com/www>
Options -Indexes +IncludesNOEXEC +FollowSymLinks
allow from all
AllowOverride All
</Directory>
</VirtualHost>


There may be other directives and specifications. I would not worry about that. The ones I want you to pay attention to are DocumentRoot and Directory. You will notice that they are the same in this case. This is exactly what you want. For each site configuration, you want your website to be in a unique directory. I suggest a format like you see above where /home/site1.com/www, /home/site2.com/www, /home/site3.com/www, etc. are for each site. Of course you change the various site# files to what your domain names are.

You will have to use the cp command to copy your site from one location to the next. You may have to use chown to change ownership, chgrp, to change group ownership, and chmod to ensure that permissions are set correctly. If you are not sure how to do this, then I suggest using something like man chown and reading the manual and being very careful not to destroy the old directory scheme and to create a new directory scheme to make sure you get it right. You may have to change any /cgi-bin/ directory directive and directory permission and redeploy any permissions which are often different from the site. Make sure if you use ls to list a directory, that you use ls-al to make sure you can see any .htaccess and other hidden files. Do this work carefully. It is easy to do, but even a seasoned *nix user can goof it up from time to time. But then again it is also easy to fix too so don't worry too much.

If you have any CMS, blog, or other application installed, you will need to research how to change the directory that it uses within the configuration. Often this is a simple change in a configuration file as well and perhaps some permission considerations.

Once you have created each directory and you are sure that the file permissions are correct, then change the configuration files. This is the last step except clean-up. If there is a problem, you can fix it quickly or drop back and punt- setting the site configuration file back to the old directory until you have fixed the problem. Only after you feel that your sites are running the way you want them too and you do not need the old directories anymore, then you can back them up for safe keeping and delete them from your hard drive.

I hope that I got it all okay. Let me know if you have any questions. I can update this answer for you or respond in the comments.

10% popularity Vote Up Vote Down


 

@Shelley277

That's because of all of your websites are hosted in same place. me.example.com/ is your main domain and other 5 domain are add-on domain those acting like subdomain for me.example.com/ . You have to tell Google or other Search engine by editing .htaccess to not to index as sub domain of main domain. But to index as individual domain .

Also it's bad practice for hosting server security.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme