Could a site on a subdomain be seen as duplicate content

Hi,

I recently changed to a new host and now have an account which allows a primary domain and 2 subdomains. The domain names are registered with another company and redirected via DNS (as usual)

In my hosting account the primary site is installed on the root of my hosting account. Then I have two folders on this root which “contain” the other 2 subdomain sites (which have nothing to do with the main primary site). Each of these has its own domainname pointed at it by DNS.

I understand that this is the correct way to do things and everything works ok.

My question:

I have a primary domain called (for example) www.primedomain.com and a subdomain called www.subdomain.com the contents of which live in a folder (lets call it “subdirectory” )in the root directory of the primary domain

So now I can access the site via:

www.subdomian.com
But I can also access it by

www.primedomain.com/subdirectory/index.html

Will this be indexed and seen as duplicated content by Google etc ?

If so how can I stop this happening ?

Thanks for your help and patience :smiley:

It will be seen as duplicates yes.

Why dont you make a .htaccess rule to check the url on that folder.
If its www.primedomain.com/subdirectory/filename then redirect to www.subdomain.com/filename

Thanks for helping out.

Presumably these rules would need to go in the .htaccess in the root directory - right ?

Would that have to be done individualy for each .html file or could I do one for the whole directory ?

If so, it just occurred to me that I could just put a line in the robots.txt file to stop the bots from spidering the whole “subdomain” directory. Would that work ?

I figure that no-ones gonna put this address into a browser.

Thanks