Now that’s we’ve covered how great WordPress is as a general SEO CMS on the first page of this WordPress SEO tutorial let’s take a look at how WordPress should be setup to run as a SEO CMS or to make a general WordPress blog do better in the search engines (especially Google).
If your new to WordPress out the box your new WordPress URL’s will be along the lines of:
www.domain.com/?p=1
This is called a dynamic URL and contains variables (?p=1 is a variable), when Google was first created their search engine algorithm couldn’t read URL’s like this, in layman terms you were pretty much stuck with URL’s lacking variables (meaning no question marks ?) simple URL’s like www.domain.com/page1.html. Today Google and all other major search engines have no problem at all with dynamic URL’s like this and so your site will be fully spidered/indexed by Google etc… However, there is a MUCH better way to present your URL’s for better search engine rankings and that is the SEO friendly WordPress permalinks that can look like this:
www.domain.com/awesome-site-on-keyword.html
www.domain.com/awesome-site-on-keyword
www.domain.com/awesome-site-on-keyword.php
or many other ways to present your content.
I usually use the top version because Google spiders pages ending in html faster than those ending in php (Google assumes a page ending in php might be dynamic and slows spidering) and I like to see end content pages ending in .html and archive pages like your Category archive to lack .html (just my preference, any of the above are good SEO wise).
Optimize your WordPress URL’s
To achieve this is relatively easy.
Under your WordPress dashboard in WordPress 2.7 on the left menu find “Settings” and click the down arrow (you get this arrow by hovering over the Settings links and it will show to the right of the link) to open up more options, click “Permalinks”.
On the new page the “default” box will be ticked if this is a new WordPress installation or you’ve never changed this setting.
To get the www.domain.com/awesome-site-on-keyword.html type format tick the “Custom Structure” tick box and enter the following text precisely in the box:
/%postname%.html
or
/%postname%
They both do pretty much the same thing, so doesn’t matter which one you use.
If you want a different setup use the variables on the Permalinks settings page to build your desired URL structure. For example if you wanted domain.com/category-name/post-name.html you would use this test:
/%category%/%postname%.html
For SEO reasons I recommend /%postname%.html or /%postname% if you don’t like the .html. I’m tending towards /%postname% for new sites as adding html is making multi comment paged post look messy (they work fine, but look messy).
If this is a new WordPress blog installation (content not indexed in Google yet OR you don’t mind loosing current search engine listings) I strongly advise making this permalinks settings change, it will give your pages a small boost in the major search engines as long as you use relevant keywords (this is VERY important and covered later) to your content in your blog post titles.
If this is an old WordPress installation and you currently have the default www.domain.com/?p=1 format you can still make this change in WordPress 2.7+ and experience an increase in search engine rankings for your WordPress blog. The latest versions of WordPress now automatically 301 redirect the dynamic URL’s to whatever version you choose under these permalinks options: very impressed with the WordPress development team adding this feature (well done guys).
This means if your WordPress URL’s currently look like www.domain.com/?p=1 and you make the permalinks change advised above Google will automatically know www.domain.com/?p=1 goes to one of the new page URL’s and your site will work when people come to your site from either type of link. This means you can make this change if your site is years old and since 301 redirected pages are not penalised in anyway in Google your old search engine rankings and backlinks will transfer to the new page URL’s. I’ve made this change on a few old WordPress installations that had quite good Google rankings with good results. Please be aware short term you may loose some SERPs, but they will recover quickly (well under 6 weeks in my experience) and should improve after your WordPress blogs fully reindexed. Can be well worth making this change on a large keyword rich (where your posts titles are keyword rich) WordPress blog.
Note: if this is an old WordPress installation and you used another URL structure like the “Month and name” structure you can’t make this change without damaging current SERPs and messing up backlinks (you could manually fix this with 301 redirects and possibly plugins, but that’s beyond the scope of this WordPress SEO tutorial article). I used the “Month and name” structure on Make Money Online Guide and that means I’m stuck with it (I changed it mid 2010 by 301 redirecting the posts manually). Don’t worry though, as long as you got the name of the post (%postname%) in there somewhere it helps a lot, if not we’ll just have to make sure everything else is fully search engine optimized
SEO Consultant Makes a Mistake
I’ve had the above information on the site for about a year and recently discovered I’ve made a mistake on advising the above without adding a warning.
WordPress works in a way that it reads a URL with the format www.domain.com/%postname% (and the similar structures I advised) by looking for WordPress Pages (the static Pages) first because they have the same structure. If you have a WordPress blog with a lot of static Pages having a permalink structure like www.domain.com/%postname% for your blog Posts can seriously slow down WordPress generating a blog Post when a visitor accesses your site (it’s because WordPress Pages use the same URL format).
I’ve been using this structure on many sites for years (sites with thousands and even tens of thousands of posts), with no obvious problems, though I tend not to use many static Pages. As I understand things as long as you don’t have lots of static WordPress Pages (static Pages are like the About page) the impact is minimal on the average WordPress site.
If worried about this use something like:
/%post_id%-%postname%
/%post_id%/%postname%
This is not ideal SEO wise as it adds the posts ID number to the URL which won’t help with SERPs. It’s not a massive SEO loss, so if you plan to have a lot of static Pages consider the above. When I make new sites I’m using /%pageid%-%postname%.
The benefit of this is anyone visiting with a broken URL like
/%post_id%-truncated-title
Will still get to the right page (as long as /%post_id% is in the URL it works).
WordPress Category base Optimization
**Warning do not make this next change on an old site that’s fully indexed**
On new WordPress installations I also change the optional “Category base” setting
To something relevant, for example on
45 Year Old Millionaire I added the word
money
To this optional setting and this results in the default URL structure changing from:
www.45-year-old-millionaire.co.uk/category/category-name
to:
www.45-year-old-millionaire.co.uk/money/category-name
So I get Category URL’s like
https://www.45-year-old-millionaire.co.uk/money/revenue-reports
The benefit of this is all the Categories of this WordPress blog will now have a small boost for search results related to money without having to even use the word money in the content (that’s how Google works). It’s only a small boost, but every little bit helps. so choose a word or short phrase (phrase format is hyphenate - keywords: easy-money or travel-articles etc…) that has relevance to the majority of your WordPress content.
For example the site above is number one in Google for “Money Revenue Reports”-
This isn’t a real money SERP that will pull in a lot of search engine visitors, but it shows how this small change helps a little bit.
**Warning do not make the above change on an old site that’s fully indexed**
As indicated above do not make the above change on an old site, only do this for new WordPress installations since WordPress does NOT automatically redirect the old Category url’s to the new like it does for the first permalink setting. So if you went with the default /category/category-name I’m afraid you are stuck with it. Don’t worry this is a small boost and I have plenty of WordPress installations that I created before understanding what this setting did doing very well in Google etc…
The other optional “Tag base” should ideally be left as is, this controls the URL’s of your tags. Social networking sites like Technorati look for sections with a tag URL to index, so you don’t want to change it. Before WordPress added tags I changed the Category base setting to the keyword tag on some sites to benefit from social networking links. If you have a diverse content site that you haven’t added tags to and can’t think of a relevant keyword for the “Category base” setting you might want to change your “Category base” setting to tags (at least it’s not fully wasted then).
When complete click the “Save Settings” button.
WordPress SEO and the .htaccess File
With a new WordPress installation or one you’ve never changed the permalinks settings, you will now be lacking a .htaccess file. After clicking “Save Settings” It will probably say
“If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.”
With a box below it with some code, these are WordPress .htaccess rules that use mod_rewrite to rewrite your WordPress URL’s from dynamic looking to static looking.
If you don’t get this information you already have a .htaccess file that’s got the right file permissions and SEO friendly permalinks should be working fine (check your WordPress blog). If not we are now going to create a .htaccess file which isn’t as easy as it sounds or should be
Interestingly it’s not as simple as you might think to create this simple text file with a strange name, personally I take a .htaccess file from another site and edit it because many text editors won’t let you create a file called .htaccess (try it in Notepad for example, it’s the . that’s the problem!). For this reason I’ve added a blank .htaccess files in zip format for downloading at:
This will make life so much easier.
Download the file above and unzip it.
.htaccess Method One:
Upload the blank .htaccess file to the same place you uploaded your wp-config.php file using a FTP program like Filezilla. Just to make our lives a little more difficult some FTP programs don’t show the .htaccess file after upload, (it’s considered a system file!) so if you can’t see your new blank .htaccess file after upload use Filezilla which does show it by default (it’s free and better than many commercial FTP packages) or follow method two (see below).
If you can see the .htaccess file in your FTP program we now need to change the .htaccess files permissions so WordPress can edit it.
In Filezilla after uploading the .htaccess file we do the following, first click “View” followed by “Refresh Views” (F5 does this as well) on the file menu (if you miss this step sometimes the permissions box has a bug on newly uploaded files and no tick boxes are ticked!).
Next “right click” the .htaccess file you’ve uploaded (in the right bottom pane window) and select “File Attributes”.
In the new box tick all the boxes so it says 777 in the “Numeric Values” box, click OK.
This gives WordPress full write access to the file so it can make changes to it. If you use another FTP program there will be a similar way to change file permissions.
Go back to the Permalinks settings page in WordPress and click the “Save Changes” button again, if you’ve done everything right the writable warning and the box with the code in it will disappear and WordPress has written those .htaccess rules to your blank .htaccess file. Check your WordPress blog to see if everything is working correctly.
.htaccess Method Two: (easier in some respects as you skip the file permissions step)
Edit your blank .htaccess file in a text editor like Notepad (weird Notepad will edit this file, but not create it!) on your computer before uploading via FTP. Load the file in Notepad etc… and copy the code WordPress created on the Permalinks setting page. It’s the code in the box below the “Save Changes” button, it will look something like this:
<!IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
<!/IfModule>
Save the .htaccess file and upload the file to your websites server using FTP (Filezilla etc…) to where your wp-config.php file is. No need to save changes again on the permalinks page this time.
Check your WordPress blog to see if it works with the new URL structure, if it does you’ve done everything right.
This gets us to a WordPress blog with SEO friendly URL’s.
I know the above sounds like a LOT of effort, but the truth is this takes a few minutes at worst in practice.
Assuming everything went to plan your URL structure is SEO friendly, you have SEO URL’s.
SEO Tutorial for WordPress
1. WordPress SEO Friendly Permalinks
2. Naming Your WordPress Blog for Better Search Engine Rankings

14 responses to WordPress SEO Friendly Permalinks
Best WordPress SEO Friendly Permalinks
I noticed in this post that you mentioned you use /%postname%/.html for you page titles, yet when I look at this page as an example, you have used /%category%/%postname%/ with no .html plus the inclusion of the category in the url.
May I ask why the contradiction? I’m just now learning to use wordpress (I’ve been using html and css sites) and I would like to get my first WP site set up the best way for seo purposes now, before I get too far..
WordPress SEO Friendly Permalinks
WordPress SEO Permalinks for Posts Only
The page you are on now is a WordPress blog Page not a WordPress blog Post. There are two types of webpages and WordPress named them so well a page called a Post and a page called a Page (calling them Static Pages would have been more helpful)!
Blog Posts are the type that get put in the monthly and category archives and archived on the home page and are organised by date.
Blog Pages are not part of the archived pages, they are basically static pages like the default About page and are only linked from the menu (under Pages) and in some themes an extra menu usually below the header. You can ad extra organisation by giving a blog Page parent or child pages.
We have no control over the permalink structure of blog Pages, they are always:
/has-no-parent-page
/has-parent-page/child-page
Sort of format.
The blog Page you are on now is a child of WordPress SEO Tutorial Page that is linked on the top menu, which is why it looks like it’s in a category called /seo-tutorial-for-wordpress/ (that’s the URL of the SEO Tutorial parent page, there is no SEO Tutorial category).
So on this site I’ve used %postname%.html format for blog Posts. There’s no real difference between %postname% and %postname%.html really.
Hope that makes sense.
David Law
WordPress SEO Friendly Permalinks
Great stuff you got here SEO mofo! I just bumbed into your site today somehow and I thank my stars!Can you help me with one basic info but a vital info for me. I got some 300 articles in my site with the common setting – month and name. You also said redirecting the entire links through 301 is not advisable. So how do i go ahead?
Thanks for your guide! I had the .htaccess in the wrong directory, so I couldn’t access my articles via the permalink anymore.
WordPress Category base Optimization
Thank you for the useful tips. I have one question though:
I created my wp site about a month ago and only have about 5 posts on there. You said not to change the category base on a site that was already created. But I’m not worried about my 5 posts not getting indexed by google so is it OK if I change my category base? I want to change it to freelance-writer.
Thanks
Effect of change permalink with backlinks
I want to try changing the permalink on my website. But I am afraid of losing my backlinks that have previously been put on some websites. Any suggestions for this?
Best way to name "multi-part" posts.
Hi David. I just found your page here. Thanks for the content. I have a question that you may be able to help with, if you wouldn’t mind.
I have a review site up for ProBlogger’s latest eBook, Blog Wise. I’m doing a review of each chapter (after the initial overall review) and my original thought was to name the posts like this:
Blog Wise Review Update -- Darren Rowes’s Chapter
Blog Wise Review Update -- Amy Porterfield’s Chapter
Etc.
How would it affect Google by starting each of 9 post exactly the same way?
Is there a better way?
I already have the first 2 chapters done and published and will be publishing #3 later today.
Thanks for any help you can give.
Ed
WordPress SEO Friendly Permalinks
Blog Wise Ebook Review and SEO
That’s a good SEO question and one I struggle with when I need multiple pages basically on the same subject.
Ideally you want every page of a site to target a specific set of SERPs, your current proposed titles are far from ideal because of the 7 words with each title you only have two unique keywords and are they really phrases people search for: do searches look for “Darren Rowes’s Chapter” and similar when looking for “Blog Wise Ebook Review” SERPs?
I’m not familiar with the Blog Wise Ebook so no idea how it is laid out, what I’d do is look at what the main content of each chapter is, if one chapter is about Making Money with WordPress a better title might be:
Blog Wise Ebook Making Money with WordPress Review
or
Blog Wise Ebook Review Making Money with WordPress
You then have a unique title (the title element is very important) for each page and they tie in with the main review page which I assume you are titling something including “Blog Wise Ebook Review”.
When you link from the main page to the other pages the anchor text will partially help the main pages SERPs (will include the keywords “Blog Wise Ebook Review” or similar) and when the individual pages link back to the main page the anchor text can be something like “Blog Wise Ebook Review”.
If you were a Stallion SEO Theme user in the next theme update (Stallion 6.3) this would be less of an issue. I’ve added an improved version of the All In One SEO Pack Plugin, my version has 5 ‘title tags’ where you add 5 phrases for a post and they are used through the theme with of course one being used for the title element, the other 4 are used through the Stallion theme. By having multiple related keyword phrases you are less reliant on the main title.
David
WordPress SEO Friendly Permalinks
Awesome info. TY for the reply!
If you don’t mind a follow-up question, since I already have two chapters reviewed and used names as I suggested, the latest only yesterday, would it be better at this point to delete that page and make a new post with the same content and a new title, or would it be better to just leave it as is and move on with the third post and pick up on your tips from there?
Thanks so much. Going to definately be following/subscribing to you!!!
Ed
WordPress SEO Friendly Permalinks
Changing WordPress Post Slugs
If just created I wouldn’t delete the posts, I’d change the posts slugs (you can edit the URL on the edit posts page) and the titles to the best SEO titles/slugs.
If the current URLs are indexed you could setup a 301 redirect in your .htaccess file for a seamless transistion, but as these are new posts that won’t have external links to them I wouldn’t bother, Google will respider and index the new and deindex the old in the short to medium term.
David
WordPress SEO Friendly Permalinks
Ok. Great! Thanks for the feedback. I’ve changed them up -- as best I could. I’m new to all this, haha.. and really do appreciate the time and input. I think they’ll be much more friendly as far as google is concerned.
Thanks,
Ed
Hi David,
is there a good-seo way to remove the word “category”? even the category base. So that when I click on a category, it shows:
www.mydomain.com/category-name
instead of
www.mydomain.com/category/category-name
- is there any SEO value in this?
- based on your comment about the category-base, I’d think it’s not advisable to remove the word “category” from the structure?
Thanks
Héctor
WordPress SEO Friendly Permalinks
WordPress Category Base SEO Optimization
I’ve wrote about what I do with the WordPress category base in the main article “WordPress Category base Optimization”.
If you want it removed there are plugins for this, never used them as I do what I describe in the main article.
SEO wise it depends, each word in a URL that can be read by Google is counted SEO wise (helps with rankings): that would be single keywords like
example.com/category/categoryname
3/4 (4 if you include the TLD) Keywords- example, com, category, categoryname
and hyphenated keywords like
example-domain.co.uk/category/long-category-name
6/8 (8 if you include the TLD) Keywords- example, domain, co, uk, category, long, category, name
However this has no SEO value
exampledomain.com/category/longcategoryname
3/4 (4 if you include the TLD) Keywords- exampledomain, com, category, longcategoryname (none of these are real keywords, they aren’t recognisable as words).
With the above in mind if you leave the category base as the default “category” you’ve added the keyword “category” to all category URLs, unless all your categories are targeting SERPs related to the keyword category there’s no SEO benefit in this, it’s SEO negative.
If you do what I do and change the category base to a relevant keyword, I used “tag” on this site (trying to get links from places like Technoratic before WordPress tags existed, didn’t work BTW) you’ll add a keyword to all category URLs without having to add the keyword to the main content etc…
Whether this has much SEO value depends on the site.
If you buy hyphenated domains there’s an argument adding one more keyword to a URL is overkill: do I really need seo added to category URLs like at “https://www.stallion-theme.com/seo/stallion-theme-settings”?
I went with yes, Stallion is an SEO theme, but I didn’t want to run the site on stallion-seo-theme.com, was going for basic branding with some SEO (it’s hyphenated and has an important keyword theme) through the current domain stallion-theme.com. This means I have to add seo to URLs, with WordPress that’s easy, either add it as the category base or make sure it’s part of most slugs where the content is about SEO: I could have a category “Stallion Theme Settings” with slug stallion-seo-theme-settings or stallion-theme-seo-settings (loads of options).
There’s also a niche issue, a site that is strongly in one niche it’s easy to see adding one keyword to all category URLs could help SEO wise, but what about sites with no strong niche? Since I didn’t want to use a plugin to remove the category base I’ve gone with the best keyword for most of the site, this isn’t perfect SEO wise so there is an argument to remove the category base on some sites.
I’ve considered adding the ability to remove the category base to my SEO themes, but I know if I do those who don’t fully understand what they are doing are going to remove the category base on domains they’ve had for years which is VERY SEO damaging.
David
WordPress SEO Friendly Permalinks
Thanks, David.
Héctor
Leave a reply to WordPress SEO Friendly Permalinks