Welcome to the best SEO Tutorial online with regular updates […]
Continue Reading SEO Tutorial
SEO Expert with 20 years experience who is looking for a full-time SEO job.
Welcome to the best SEO Tutorial online with regular updates […]
Continue Reading SEO Tutorial
Hi David,
I set up two test sites a while back with almost same content as my main live site and I forgot to delete them.
A little checking has shown that quite a number of pages and posts are indexed from the test sites and these would be duplicates of content on the main site.
1) My first thought was to delete the test sites but that might just leave the content still in google index
2) My second thought was to redirect all the pages and posts and that is huge job with around 400 pages/posts per test site so 800 pages ..ish
3) My third thought was to redirect the entire test site from within cpanel as they are in subfolders of another domain.
I am completely rebuilding my main site, however these 400 or so content pages will stay as isI will be adding new main keyword pages and changing the link structure within the site. When Im done I want to re submit to google and to be sure that the 400 pages from before are also indexed.
What are your thoughts?
Thanks and blessings!
Carl :-)
How to Manage 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 few months I’ve been moving content from other domains to here, so in effect generating the same issue you have. Same content on two or more domains, this SEO tutorial for example used to be on another domain.
I used 301 redirects.
If the content is in exactly the same location using the same filenames can be a couple of lines added to the duplicate sites root .htaccess file.
RewriteEngine On
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
This above is the only content of the .htaccess file if the duplicate domain is a verbatim copy of the main site.
“dupeexample.com/my-post-name/”
is also here
“example.com/my-post-name/”
Sounds like your setup is more like
“dupeexample.com/testsite/my-post-name/”
is also here
“example.com/my-post-name/”
For this your .htaccess rule would be
RewriteEngine On
RewriteRule ^testsite/(.*)$ http://example.com/$1 [R=301,L]
This would 301 redirect everything under the directory structure /testsite/ to domain.com preserving filenames, but not the /testsite/ folder name.
For parts that don’t fit for the above rule add specific rules above so they are run first, had you added a WordPress tag that you deleted on the original domain you could use
RewriteEngine On
RewriteRule ^testsite/tag/deletedtag/(.*)$ http://example.com/ [R=301,L]
RewriteRule ^testsite/(.*)$ http://example.com/$1 [R=301,L]
That would 301 redirect the deleted tag (including paginated tag pages) to the home page of the original domain.
Duplicate Content SEO Issues
Tweet Now
If you miss any specific rules it will generate 404 errors, there’s a Stallion Responsive feature under the Advanced SEO option page for 301 redirecting 404 errors, a soft 301 redirect. A specific 301 redirect like the ones above are preferred because you can aim them at relevant pages on a site, but the soft redirect means no link benefit is wasted via 404 error pages.
Also see the 301 Redirect SEO Tutorial.
David
301 Redirecting Duplicate Content
HI David,
I read what you wrote in this post and in the other 301 redirect post.
I have a htaccess file and also a .htaccess-phpup-1405520772 (not sure why there is an additional one)
My .htaccess file has the following:(Plus it has all the wp total cache rules)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Should I be adding This:
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
in addition to all the other code in the htaccess file
I moved the whole site to another domain
so now I have the original two test sites that are on
sub folders of domain1.com and also domain2.com
So there are:
domain1.com/test/
domain1.com/test2/
and
domain2.com (which has 1740 pages indexed according to that site look up that you showed how to do in the 301 redirect tutorial post)
Would I use the same htaccess code for all 3 of the sites that I am redirecting?
Thanks and blessings!
Carl :-)
SEO 301 redirect question
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/(.*)$ http://example.com/$1 [R=301,L]
RewriteRule ^test2/(.*)$ http://example.com/$1 [R=301,L]
http://example.com 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 ^(.*)$ http://example.com/$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 domain2.com/my-post.html it will 301 to example.com/my-post.html
So you understand this a little. The (.*) bit of the code is find everything
The example.com/$1 bit of the code is 301 redirecting to example.com/ 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 example.com/my-post.html.
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/(.*)$ http://example.com/ [R=301,L]
RewriteRule ^test2/(.*)$ http://example.com/ [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.
David
How to 301 Redirect a Directory
HI David,
Ha ha :-)
Phew :-)
Ok so I followed your instructions and messed around for 2 or 3 hours to get it all working and It kinda worked but not as supposed to. I think maybe the other rules in the .htaccess might have done something.
Anyway… I got the two
domain.com/test and
domain.com/test2
redirecting by putting the rules in the .htaccess in the test and test2 folders as it didnt work in the actual domain.com
But that only really redirected the main page and the specific page to specific page redirects domain.com/page1 to domainnew.com/page1 ended up reirecting domain.com/page1 to domain.com/page1 with a broken theme.
So… I thought there must be a way (Always is !)
Ok so here is the master plan which worked
——————————————-
domain.com/test
domain.com/test2
originaldomain.com
all have to redirect to
domainnew.com
So i did the whole job by finding a bunch of light weight plugins some of which hadnt been updated in 4 years but still worked.
So first I used: export-2-excel.1.0.zip and I exported a full list of the pages and full list of the posts for the originaldomain.com to two csv files.
Then
I installed simple-301-redirects.1.06.zip and simple-301-redirects-addon-bulk-uploader.1.0.11 and I uploaded each of the posts and pages csv’s and redirected the exact page to exact page
Then
I used 404-to-start.zip to redirect all 404 errors to the home page of new domain.
Then I used mass-delete-tags.1.0.zip to delete all the tags so that the 404-to-start.zip would redirect the missing tag urls
I did this for all the 3 old domains
On the new domain I dont want tags on the pages as they have a bunch of rubbish links wasting SEO.
The new site is running Stallion so I know it has a 404 redirect to the home page already and I just went ahead and did a mass delete of tags with mass-delete-tags.1.0.zip
End result is that anypage from any of the old domain or two test domains will redirect to exact page match in new domain or to home page of new domain.
I didnt get google to go and spider the old site again yet as I havent finished reorganising the new site. When ready I will send the spider in to the old site and the new site and that should I think get the new site listed.
I think Im starting to get this wp seo happening David
Thanks for all your support tutorials I have learned so much :-)
I still have questions though on a couple of other topics and will come back with those as I approach them on the new site
Thanks and blessings!
Carl :-)
By the way I was thinking to run rvg-optimize-database.2.8.3.zip to clean up the database on the new domain. What are your thoughts?
SEO 301 Redirect test and old domains to new domain
Update: did a brain fart, the $1 format was correct. Think I need more sleep :-)
so
RewriteEngine On
RewriteRule ^test/(.*)$ http://example.com/$1 [R=301,L]
RewriteRule ^test2/(.*)$ http://example.com/$1 [R=301,L]
Is correct.
Bugger, I mixed up PHP coding ($1) with .htaccess rules (?). I basically put $1 where it should be ?, should have been:
RewriteEngine On
RewriteRule ^test/(.*)$ http://example.com/? [R=301,L]
RewriteRule ^test2/(.*)$ http://example.com/? [R=301,L]
Add that to the top of the .htaccess file on the old domains and it will work. Would also work adding it to a .htaccess file inside those folders /test/ and /test2/
Have updated my earlier comment.
Stallion includes a 404 to home 301 redirect feature, so you don’t need a plugin for it as long as Stallion is active.
You don’t control when Google spiders a domain, you can request Google spider a domain, but it’s a waste of time, Google will go respider when it finds a domain via links or a sitemap added via Google Webmaster Tools.
For optimizing the database I occasionally use the WP Optimize plugin. On important site I activate it manually, run the optimizer and deactivate. for this domain I tend to run it once a fortnight.
On less important domains (I have 100+ domains) I leave the plugin active and set the scheduled database optimization option: some of my sites I won’t visit for over a year to perform maintenance.
David
.htaccess 301 Redirect Rules
I Just went through the site in google as I was wondering how a site with around 400 posts and pages could have 1740 indexed pages and it seems that many are tags pages.
It shows 249 results before i had to cick the link in google that said show duplicate pages (or something like that :-) )
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 duplicate title tags, but the larger a site gets, more likely you’ll have duplicates.
I never use tags see Why Creating Lots of Categories and Tags is Anti-SEO.
If you delete all your tags a simple 301 redirect assuming you didn’t change your tags base on the WordPress permalinks page is:
RewriteEngine On
RewriteRule ^tag/(.*)$ http://example.com/ [R=301,L]
That would 301 redirect all tags (everything indexed under example.com/tag/ (all tags have the /tag/ slug by default) to the home page of example.com
If you have changed the tag base on the permalinks page change tag to what you use.
If you’ve been using the monthly archive widget another good 301 redirect rule is:
RewriteEngine On
RewriteRule ^2013/(.*)$ http://example.com/ [R=301,L]
RewriteRule ^2014/(.*)$ http://example.com/ [R=301,L]
This would 301 redirect 2013 and 2014 dated archives to home. Dated archives have no SEO value, waste link benefit, so if you delete the monthly archive widget and/or the calendar widget add the above. Go back as far as your site’s existed, one line for each year.
Always check you haven’t got anything important indexed under a domain with a site search
site:https://stallion-theme.co.uk/2014/
and
site:https://stallion-theme.co.uk/tag/
This one shows my categories:
site:https://stallion-theme.co.uk/responsive/
Under “Settings” >> “Permalinks” I’ve changed my Category base to “responsive”.
I wouldn’t want to use a 301 redirect rule which included “RewriteRule ^responsive/(.*)$ ….” since it would 301 redirect all my indexed categories which I want spidered and indexed!
Also check with Google Webmaster Tools and/or Google Analytics none of your tags generate search engine traffic. If you find a few are pulling in traffic either keep those tags or 301 redirect them to the most relevant webpage on the site (similar SERPs).
If you had a tag called “Awesome” that had SERPs and a category called “Awesome Stuff” a possible solution would be delete all the tags and use this:
RewriteEngine On
RewriteRule ^tag/awesome/(.*)$ http://example.com/category/awesome-stuff/ [R=301,L]
RewriteRule ^tag/(.*)$ http://example.com/ [R=301,L]
This would 301 redirect the Awesome tag to the Awesome Stuff category conserving SEO benefit. All other tags 301 to home.
This way you can conserve any ranking value from tags that have SERPs and redirect the rest to home.
In my experience tags tend not to generate traffic, especially single word tags. I’ve bought dozens of WordPress blogs with loads of tags I’ve deleted and never had to use the above code to conserve traffic. Though being a perfectionist I setup those types of 301 redirects anyway, I look for the most relevant webpage for something I’ve deleted because I can :-)
David
301 Redirect All WordPress Tags to Home
I really know that now very useful things which needed on SEO.I have a blog slowly increasing traffic and for that tutorial i think i have use it to my blog.
Thanks everyone ,,,
Dave sorry to be repetitious but I have to thank you again. I implemented “part” of your advice (will implement all after I learn how)and within 1 or 2 days got 75% of my traffic back and it is going up QUICK! :) I cannot believe how fast that worked. You definitely know your SEO business! Funny how a code clean website that I have now along with your advise can perform so awesome.
I thought Genesis framework was the “best” but now I understand how much they really suck. LOL You have an EXCELLENT thing going here so PLEASE keep up the great work because I am putting all my “eggs in this theme basket” and feel that it is a wise decision. PLEASE continue to stay “old school” and up to date like you are now. I have been “stalking” your articles on and off for a month now at least, leaving and something just always pulled me back in. After reading volumes upon volumes of SEO “expert” bullshit you are a breath of fresh air. Seriously!
I had a whole lot of 404 errors for a long time and all the so called “experts” say to make a “custom” 404 page. BS. 4 years ago on my first WordPress website I came across a little plugin I think it was called “301 to homepage”. I use to use that plugin and thought it was great. Then I read advise from the “experts” who said you will “destroy your website” doing that. I call BS on that opinion now.
After seeing that your theme recommends that I had no problem checking that option. I had TONS of 404 errors because I am continually changing everything and many times “screwing things up”. When you recommended that (via theme settings) I checked it immediately since I trust your advice plus I had nothing to lose since my website was such a mess. Anyhow my thousands of 404 errors are now history and my front page is rocking in the traffic like a rock star.
By the way you won’t believe what happened to me today. I was looking for a plugin to turn on all the post comments mass since I had shut them all of by hand on every post. I even called my awesome hosting company after finding some hack php code article and it failed. Anyhow I hit the search engines looking for a way since I was not going to go through 200 articles by hand and guess who I found had the solution after searching the duckduckgo search engine??? This website :) I am not kidding. Hows that for some crazy coincidence??? LOL This must be a one stop shop for everything SEO wordpress.
Got my Search Engine Traffic Back! :)
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 soft 301 redirect of 404 error pages is a useful SEO feature for recovering lost SEO benefit and visitors. If you have high traffic 404 traffic or highly relevant anchor text of links to a 404 page (deleted page) you should try to 301 redirect to the most suitable webpage.
Let’s say I deleted a webpage /2013-seo-tutorial/ with title tag “2013 SEO Tutorial” and it’s got some high quality backlinks using anchor text “2013 SEO Tutorial”. The 2013 part won’t be that important now, but the SEO Tutorial phrase is really important.
The soft 301 of 404 Stallion feature will direct all the SEO benefit of the deleted 2013 SEO Tutorial webpage to my sites home page which isn’t specifically about SEO tutorial. If I manually added a 301 redirect of /2013-seo-tutorial/ to my most relevant page to SEO Tutorial: https://seo-gold.com/seo-tutorial/ that webpage will benefit from the link benefit AND the anchor text of any backlinks.
In a perfect SEO world recover the most important SEO benefit via manual 301 redirects and what’s left will be automatically recovered via the soft 301 redirect of 404 error pages feature to the home page.
Http to Https Htaccess 301 Redirect Rules Tutorial
Tweet Now
I guess you found my comment How to Turn WordPress Comments On Sitewide
In Stallion Responsive 8.2 update (hope to release this month: October 2014) I’ve added a Google search page to the main “Stallion Theme” options page so Stallion user can search from under their Dashboard for relevant webpages indexed by Google under this domain. Added the same custom Google search form on the Recent Comments page (this link is on the main navigation menu as well “Recent Discussions”).
I’ve wrote thousands of comments answering SEO questions and thanks to the Stallion SEO Super Comments Feature they are indexed by Google and other search engines as independent webpages, so can be found for relevant searches using Google.
With Stallion creating comments can add some series traffic to your site, I love this SEO feature because I don’t feel like I’m ‘wasting’ my time answering comments. With most (maybe all other) WordPress Themes comments don’t add any SEO benefit to a site, with Stallion they can add a lot of SEO benefit to the article they are on and increase search engine traffic in their own right.
Makes writing support comments more than a chore to show you offer good product support, they generate new search engine traffic. Makes writing comments enjoyable, I know every comment I create could increase search engine traffic, especially for long tail SERPs.
This comment I’ve titled “Search Engine Traffic Recovery”, the Stallion SEO Super Comment which Google can index will have a title tag “Search Engine Traffic Recovery”.
On the SEO Tutorial article this comment is associated with will now have two links with anchor text “Search Engine Traffic Recovery”, this is relevant to some of the SERPs the SEO tutorial article targets, specifically Search Engine Optimization Tutorial SERPs.
Two of the four keywords “Search Engine” from this comments title aids the Search Engine Optimization Tutorial SERPs directly. And the comment might generate traffic from SERPs like Search Engine Traffic Recovery, or maybe will help with a SERP like Search Engine Traffic Tutorial.
The comment also links back to the SEO tutorial article with anchor text “SEO Tutorial” and an image link with alt text “SEO Tutorial 2014” (one of the Stallion keyphrases). All adds to the on-site SEO supporting the SEO tutorial SERPs.
I also use comments for adding what are short articles (short for me anyway :-)) that target long tail keyword SERPs like the SERP Long Tail Keyword SERPs: yes, top 10 for that Google SERP with a comment :-)
David
Search Engine Traffic Recovery
SEO is very powerful tool to visible your site on search engine.
Nice articles about SEO learn a lot.
Hi there, the link https://seo-gold.com/seo-meta-tags/ leads to a blank page.
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 the W3 Total Cache Plugins Cache and it’s working in Chrome as well now.
Next step (in the morning) track down why the cache was broken???
Thanks for letting me know, appreciate it.
David
It’s okay now, the page is shown.