Setup Optimized Permalinks
Posted on August 2, 2007
Filed Under WordPress Admin, WordPress Configuration |
Permalink, an abbreviation for permanent link, is a permanent URL for a post page in your blog. In WordPress you give each of your post a permanent URL for search engines to index and visitors to bookmark.
Permalink is NOT turned on by default in installation. For example, without permalink, the first sample post (Hello World!) has its URL as:
http://www.wordpressprofit.com/?p=1
That’s not good for search engines because when robots get this link, mostly they tend to skip the dynamic part of the URL (?p=1) therefore this post will not get indexed. Also, this URL is less user-friendly.
To setup permalink, log into admin panel, select the Options tab, and click the Permalinks sub-menu. Two pre-set permalinks are given: “Date and name based” and “Numeric”.
If I click “Date and name based” radio button and save, I set permalink for the first post like:
http://www.wordpressprofit.com/2007/08/01/hello-world/
If I choose “Numeric”, my permalink would be:
http://www.wordpressprofit.com/archives/1
where the number “1″ is the post’s ID created in the database.
The numeric permalink is short but the number does not provide any meaning, thus it’s less readable.
The Date and name based permalink ties the URL to the post date. In case you have to change the date of your previous post, you change the URL as well, thus it is not really permanent. Also, it puts so many levels of subdirectories, which search engines don’t like.
To optimize WP blogs for search engines and to make the URLs more readable, a permalink should be short, strightforward, and easy to read. Here comes the Custom permalink. For my blogs, I set the Custom structure as:
/%postname%_%post_id%.html
The permalink of the first post becomes:
http://www.wordpressprofit.com/hello-world_1.html
When you update the Custom permalink structure, WordPress will try to create or update the “.htaccess” file on your web hosting to add the mod_rewrite information. However, if your server files are not writeable, you will be given an instruction to update your .htaccess file manually. The updated code is given in a text box, you just need to copy and paste to the .htaccess file and upload it to the web server. The .htaccess file has the following line in it:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
As you see, my permalink is short, keyword embedded, right under the root directory, and presented as a HTML file. The number part (_1) does not make it look better but I have to include it (_id%) because WordPress documentation says it’s best to include some numeric data (e.g. the post ID or date) in the permalink to prevent problems with rewriting rules. That is the best permalink structure I figured out.
WordPress provides good permalink documents. If you don’t like mine, you can follow the instructions and design your best permalink structue to make your blogs provide better marketing and advertising of the posts.
Comments
2 Responses to “Setup Optimized Permalinks”
Leave a Reply
Great permalink structure, I’ll use it, thanks.
[…] That is the starting point of WordPress SEO, - configure permalink for you blog. Determine a permalink structure and stick with it for all of your post articles. Then every article from you site will have a permanent URL indexed by search engines. Choose the permalink structure carefully. Once you decide, don’t change it because all of your posts have been assigned a permanent URL on the same structure. My site use %postname%_%post_id%.html […]