Knowledge Base

Use Pretty Permalink URLs in WordPress


What are Permalinks?

Permalinks are the permanent URLs to your individual blog posts, as well as categories and other lists of blog postings. A permalink is what another blogger will use to link to your content, or how you might send a link to your post to someone in an email. The URL to each post should be permanent, and never change, that's why they're called permalinks.

A permalink may look like:

  • http://YourURL.com/?p=postid

  • http://YourURL.com/2012/post-name/

  • http://YourURL.com/2012/12/30/post-name

Make those URLs Pretty and Clean

So.. you want pretty permalinks huh? WordPress depends on rewrite rules in the .htaccess file for most of its pages to work. If your site's front page works, but none of the other pages work, for example, this might be the fix!  In case you need it, here's the default .htaccess rule:

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Basically, just create a file in the WordPress folder called '.htaccess' (yes it starts with a dot/period) and and add the above text to that file.

Did you find this article helpful?

* Your feedback is too short