I have a client who has multiple domains, some are being indexed with AND without the www. The other issue is that they are all the same site. One of them has a different homepage, but all the content is running from the same server files. They also have two two folders, NEW folder and SERVICE AREAS folder, with identical files. This is causing an issue with their seo guy and the person who made the site for them doesn’t know how to fix it! So the seo guy asked me to just rewrite all the domains to the main one with www. So my plan of attack is this:
Make two redirects for each domain, one redirecting the non-www and one redirecting the www, to the main domain with the www
Redirect the NEW folder to the Service Ares folder.
My questions are:
do I have to write separate redirects for each domain twice, or is there a all inclusive way to do this?
That depends on how it’s set up. If all domains are served from one directory you can apply method 1 from answer 1 just once. If they run from multiple directories you need to it apply it once for every directory.
Also, I would put the redirect before the other Rewrite, because otherwise you’d have to redirect twice, once to the correct domain, and then once to the correct directory. Whereas if you put it first it redirects to the correct domain and folder at the same time.
Apache doesn’t have to know as you’ve indicated the files are co-located (parked domains). Therefore, there’s only one .htaccess to work with so Apache will do it all there. If they’re not co-located, just do the same thing in each DocumentRoot.