What is Permalinks?
WordPress defines permalinks as “Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to link to your article (or section), or how you might send a link to your story in an e-mail message. The URL to each post should be permanent, and never change — hence permalink.”.
Why change Permalinks?
If you read around you will find that changing the permalink structure will help with search engine optimization. By default WordPress’s URL structure looks like this:
As you can it conveys nothing about what the page is about. By having a short post title in the URL it not only optimizes the page for search engines but also it gives the visitor an idea of what the page is about from within the search results. In many cases this might be a reason for the visitor to pick your post among all the search results.
What Permalink Structure is the Best?
WordPress offers several permalink structures. Having category names is can be tricky if you have each post assigned to multiple categories. Having dates can be detrimental to older posts. Therefore, my recommendation is to go with the following:
How do I change Permalink Structure?
This procedure assumes the following:
- You are running WordPress (>=3.0) on a Linux server
- You are running Apache with virtual hosts defined in /etc/apache2
- You currently have the default permalink structure
For other scenarios, check this page.
First, enable Apache’s rewrite module using the following command:
sudo a2enmod rewrite
If it is already enabled, you will see “Module rewrite already enabled”.
Next, edit your virtualhost file to enable FollowSymLinks option and FileInfo directives:
cd /etc/apache2/sites-available sudo nano domain.com
Note that “domain.com” is the name of your WordPress site. Then edit the file as shown below (highlighted sections):