Comment on SEO Tutorial by SEO Gold Coast Services.

You add the .htaccess file 301 redirects to the domains you are redirecting FROM (domain1 and domain2 in your example) NOT the domain you are redirecting to (the site with the original content). So you would add code to 2 of the 3 domains .htaccess files, not all of them.

If your two duplicate domains both have two directories with 100% verbatim copies of the original site it’s easy. Add this to the top of the root .htaccess file for domain1 and domain2:

RewriteEngine On
RewriteRule ^test/(.*)$$1 [R=301,L]
RewriteRule ^test2/(.*)$$1 [R=301,L] is the home page of the original domain with the unique content: the domain you want Google to index.

This will mean when loading anything on domain1 or domain2 under the folders /test/ and /test2/ will automatically be 301 redirected to the original domain maintaining filenames: posts will redirect to the relevant posts, categories to categories…

Anything on domain1 and domain2 NOT under the two test folders will still be available on domain1 and domain2, so it’s only those two folders affected.

Might be reading your last comment wrong on domain2. If domain2 doesn’t have the test folders, but is a verbatim copy of the original domain, for domain2 only the .htaccess file would be:

RewriteEngine On
RewriteRule ^(.*)$$1 [R=301,L]

This will mean when loading anything on domain2 it will automatically be 301 redirected to the original domain maintaining filenames: posts will redirect to the relevant posts, categories to categories…

If there’s a post on domain2 with URL it will 301 to

So you understand this a little. The (.*) bit of the code is find everything
The$1 bit of the code is 301 redirecting to and whatever is found with (.*) is used as $1.

When a post my-post.html is found with (.*), the $1 is replaced by “my-post.html” so we have a 301 redirect to

Rather than manually writing dozens of 301 redirects, the above does it for you. The rules starting “test/(.*)” are saying find everything under the folder /test/ instead of finding everything on the entire domain.

Makes creating 301 redirect rules so much easier when you understand this.

This one would 301 redirect your two test folders to the original domain, but NOT maintain filenames, all the 301 redirects would be to the homepage.

RewriteEngine On
RewriteRule ^test/(.*)$ [R=301,L]
RewriteRule ^test2/(.*)$ [R=301,L]

You would use something like this if your two test folders aren’t using the same WordPress permalink structure as the original domain (so post filenames don’t match) and just wanted a quick fix to get rid of some test installs. Note the $1 has been removed.


More Comments on SEO Tutorial by SEO Gold Coast Services

Broken W3 Total Cache Plugin HTML Cache

The Meta Tags article worked as expected in FireFox (I was logged into WordPress), but didn’t work in Google Chrome (not logged into WordPress in Chrome).

Suspected a cache issue, cleared …

Search Engine Traffic Recovery

Glad to hear your search engine traffic is recovering, the adult niche is a great niche to be in for high traffic, sex/porn etc… will never loose it’s appeal :-)

The …

.htaccess 301 Redirect Rules

Update: did a brain fart, the $1 format was correct. Think I need more sleep :-)


RewriteEngine On
RewriteRule ^test/(.*)$$1 [R=301,L]
RewriteRule ^test2/(.*)$$1 [R=301,L]

Is correct.

Bugger, I mixed up PHP coding ($1) …

301 Redirect All WordPress Tags to Home

I guess you are using Google Webmaster Tools and looking at duplicate content issues.

“Search Appearance” >> “HTML Improvements” >> “Duplicate title tags”

In a perfect SEO world you wouldn’t have any …

301 Redirecting Duplicate Content

Easy SEO mistake to make.

Good news is Google has probably taken the duplicate content as duplicate and ignored it, but you still should sort it out ASAP just in case.

Last …

Manually Remove Links Added to WordPress Comments

LOL, there’s no point adding links to the comments here for several reasons including this WordPress site isn’t here to benefit other sites SEO wise.

1. I manually delete comments with …

SEO Tutorial Keyword Placement

If you read through the various SEO Tutorial pages it explains in great detail where to place various keywords.

For example

Importance of SEO Domain Name Choice

Business and …

SEO Training Courses

Please stop posting comments asking to learn SEO or asking about Free SEO training courses, I don’t teach webmasters etc… SEO for free beyond this free SEO tutorial (this is …

How to Search Engine Optimize a Website

All websites are optimized the same way Bishnu so read the SEO Tutorial. Reality is you used the Tutorial comment area as a way to gain a text link back …

Free SEO Tutorial

It’s a free SEO Tutorial, please don’t SPAM the comments with links, they are rel=”nofollow” so no SEO benefit to posting here.

Also if a comment isn’t more detailed links are …

More Comments by SEO Gold Coast Services

Mass Unfollowing Thousands of Twitter Accounts

In my experience there’s very little if any risk in mass unfollowing.

I have Twitter accounts with tens of thousands of followers and tend to mass unfollow on an irregular basis …

Let’s Encrypt 302 Redirects HTTP to HTTPS

I’m glad you asked this question, I’d not realised there was an error in my VPS server setup!

I recently moved to a new VPS server and there was a new …

Google Defamation Process

Most likely Google alone.

Google trusts what they are told via the defamation reports, there doesn’t appear to be any detailed checking on Google’s part!

So if someone makes a credible defamation …

Google Mobile Usability Test

SEO tools like SEOptimer are generally not very good, they are built by programmers who are human and they make mistakes, so I’d take the SEOptimer Usability Device Rendering F …

Twitter Permanent Suspension

When you said “I apply most of the tricks talked about in this article” does that mean you are following at least 400 Twitter accounts everyday and unfollowing them all …

Camping World Biloxi

This is a Camping World Biloxi SEO test.

The Camping World Biloxi Google search phrase sees around 1,900 searches a month, a number 1 Google listing for Camping World Biloxi would …

Revolution Slider JS Bloated

All because I avoid using flashy JS features via plugins like Slider Revolution to maximise pagespeed does not mean I don’t know how to use flashy Javascript features whilst minimising …

GTmetrix Website Speed Test Location

Regarding GTmetrix speed testing you have to take into account hosting location when comparing 2 websites targeting different countries.

My SEO Gold site which mostly targets the UK market is hosted …