WordPress SEO by Yoast – using sitemaps

If you are using the fabulous WordPress SEO plugin by Yoast, you’ll find that it also does the job of creating a sitemap for you.  You need to opt in to this within the plugin’s settings field here:
XML sitemaps” then tick the “Check this box to enable XML sitemap functionality“.

There are a few caveats that this plugin doesn’t make you aware of though and this can affect the whole indexing of your website by the search engines.

1. If you are now making reference to this sitemap elsewhere (such as within W3 Total Cache etc) then you will need to alter the path to your sitemap thus:


2.  You will need to remove any other sitemaps from your root folder. Look for:



3.  Make sure that your robots.txt has this line:



Your XML sitemap doesn’t actually exist at this location so don’t think it’s not working if you can’t see this file. Yoast’s WordPress SEO plugin places the files in a subfolder of your uploads directory, and using WP Rewrite the URL will resolve to the right sitemap. It also works with Multi Site installs whether domain mapped or not.  To check it is functioning, fire up your browser and navigate to the sitemap (as in step 3 above). You should see the file there.


Hope this helps!


Remove blue image border in Internet Explorer

So you have your site displaying images as links and it works in Firefox, Safari and Chrome, but in Internet Explorer you get a very annoying blue border around the image?

This a cross-browser CSS incompatibility problem and IE seems to suffer more than others.

The fix is a line of code that will be compatible with all browsers. Find your style sheet (usually style.css) and add this line towards the top:

a img {border: none;}

If you want a border use this:

a img {border: 1px solid #CCCCCC;}

If you’ve want a border when the mouse moves over the image, use this:

a:hover img {border: 1px solid #CCCCCC;}

Simple and effective. Drop me a comment if this helped you out.

Notepad++ compare icons explained

Notepad++ compare iconsHere’s a brief explanation of the Notepad++ compare icons which are surprisingly undocumented:


  • Green plus symbol = line added
  • Red minus symbol = line deleted
  • Yellow exclamation mark symbol = line changed
  • Blue arrow symbol = line moved


You can access the compare menu from Plugins, Compare, Compare or by simply selecting Alt-D. You need to load the 2 files to compare first and have them as the last 2 on your tabbed list.

Notepad PlusPlus search up and down annoyance

With Notepad++ freshly installed, the default behaviour for the search function is to select either “Up” or “Down” directions.  This for most programmers is hugely annoying because the document start or end is reached before all instances of the word or phrase are found.  Find and replace uses the same functionality too.

Fortunately, there is a fix.  You should tick the “Wrap around” checkbox as I have highlighted below.  This will then give you the (correct?) full search behaviour.

Notepad plus search up down loop find replace

Hope this helps shave a few minutes off your day and saves some RSI on the wrists!

Should I block the Yandex bot?

Should the Yandex Russian Search Engine Bot be blocked from spidering your pages?  I believe it should.  I did some serious testing using server logs and honeypots and this bot currently does not respect robots.txt files.  Worse still it applies such a server load that it must be contained.

I initially had this code (amongst others) in the .htaccess file:

SetEnvIfNoCase User-Agent "^Yandex bot" bad_bot

<Limit GET POST>
Order Allow,Deny
Allow from all
Deny from env=bad_bot

but because it’s a persistent little critter I now have this as the first line:

SetEnvIfNoCase User-Agent "^Yandex*" bad_bot

If it bothers me any more, I shall start to fight back and start a campaign against it.  One of our team got so fed up he did this:

# permanently redirect specific IP request for entire site
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} 77\.88\.26\.27
RewriteRule \.shtml$ https://www.youtube.com/watch?v=oHg5SJYRHA0 [R=301,L]

Now the Yandex bot gets RickRolled every visit.  Imagine half a million sites doing this…..