Tag Archives: .htaccess

WordPress: Protect your WordPress site from BAD BOTS

WordpressHow to block bots from seeing your website

After dealing with a recent issue of BAD bots hogging up my server resources, I began to look into solutions for keeping these nasty critters out. At one point my web site was even shut down BY my ISP because it reported close to 414K hits from bots that were hogging the resources (on a shared server, that is)

I did give the solution “Black Hole” a whirl, however after following instructions, my site wouldn’t come up due to errors.
So instead of trying to figure out why a recommendation that was actually quite old (2010) wasn’t working I went a different direction.
(Note: if “Black Hole” is still working, then “perishablepress” might want to update their notes to current rather than adding on a addendum that seemed to confuse. Continue reading WordPress: Protect your WordPress site from BAD BOTS

How to Stop Known Scrapers from Accessing your Blog?

Scrapers are web sites that syndicate your content into their blogs (stealing) and in some cases end up outranking your site in the search engines for articles), it requires a 2 step process. First, who is it? and then 2nd how to block them in the future.

Readers should also know that this is usually done automatically using a plug in or script that “imports” your content into theirs upon postings. Google changes have helped prevent this on some levels but still its a big issue that is not fully combated. If you have a WordPress blog, there are already plugins that will do this function for the offending blog site.

How do I know if I’m being Scraped?
Usually you will discover this when doing searches for your own published articles and seeing them appear elsewhere, with same title, same content and even you same links (that usually link back to your own site as posted). You might even discover this thru Google Analytics. In short, eventually you’ll see “your complete articles” appearing in searches that are not coming from your web site

Why is Scraping an issue?
Offending Sites have been known to outrank the original sites with their own content Continue reading How to Stop Known Scrapers from Accessing your Blog?

301 redirect WWW to non WWW (.htaccess)

In some cases you’ll want to make sure and re-direct all usage of WWW to you non WWW web address. This will also consolidate your homepage link juice to make sure that only 1 url is getting credit rather than 2. The formal term for this is “URL canonicalization”

01- Open your .htaccess file in notepad

02- paste in the following code at the top of the document (replace yoursite.com with your own site address)

RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
RewriteRule ^(.*)$ http://yoursite.com/$1 [L,R=301]

03– save and overwrite your previous file (in root)

Note: you’ll also want to add the additional 301 redirects for the following reasons:

A site can have up to 4 variations. Though what that means is that your link popularity could also be divided between these variations.

Assuming your site address is http://yoursite.com, you”ll want to have the other 4 variations redirected to http://yoursite.com

Those other variations could be:

(Now its important to note this level of scrutiny should only be limited to your home page)
(you should also write your code depending on how your end desired URL should look)

Now to further the above code, I also suggest adding the following to and END RESULT like this:

RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
RewriteRule ^(.*)$ http://yoursite.com/$1 [L,R=301]

redirect 301 /index.html http://yoursite.com/
redirect 301 /index.htm http://yoursite.com/

Continue reading 301 redirect WWW to non WWW (.htaccess)

WordPress: .htaccess tip – Redirect feeds to FeedBurner Instantly

This method is so simple, I dont know why folks bother with any other way.
You want to sign up for a Feedburner account and have folks sign up for that one rather than your default WordPress RSS
(This makes it easier for them and better to keep track of)

1- Open your root directory  “.htaccess” file

2- Add this snippet of code to the top of the text file: (yes before the part that says “# BEGIN WordPressContinue reading WordPress: .htaccess tip – Redirect feeds to FeedBurner Instantly