After having installed WordPress on your own web hosting, it is important to set it up properly. One of the important customizations is to select the right permalink structure or URL structure for your blog.
For search engine optimization (SEO), the website URL should be human-readable and provide some insight into what to expect on the webpage.
Bad URL: http://foodbloggingguide.com?p=101
Good URL: http://foodbloggingguide.com/five-chocolate-pastry-recipes
Good URL: http://foodbloggingguide.com/five-chocolate-pastry-recipes.html
Good URL: http://foodbloggingguide.com/five-chocolate-pastry-recipes.htm
Good URL: http://foodbloggingguide.com/five-chocolate-pastry-recipes.asp
The first permalink URL does not provide any information about the webpage's content. In contrast, the good permalink URLs tell us that the page is about chocolate pastry recipes.
In WordPress, you have the option to set the desired permalink pattern structure.
- Log in to your WordPress website @ YourDomainName.com/wp-admin/
- Using the sidebar menu, navigate to Settings -> Permalinks
- Pick any permalink structure which shows the title/keywords of the page as well.
- Choose the Post Name permalink option. The title of the post/page will be used to generate the perrmalink URL.
- Alternatively, you can choose the Custom Permalink option and add the following: /%post_id%-%postname%/
Permalink structure for big websites
For the best performance of a WordPress blog with hundreds of posts/articles, it is recommended that the URL structure begin with the Post ID, which is a unique number of each post or page.
This is because WordPress executes a search each time we type a URL. The URL string is searched through the list of permalinks and the post that matches is shown. For small websites, it should not be a problem. The search begins to put strain on your website server when that number of posts/pages published is grows significantly large.
Imagine yourself searching for a particular article from the list of 10 pages. What would be the scenario if you have to check for articles from 1000 sheets in a notebook? If you maintained an index of articles with page numbers, does it make easy to find the right article?
For this simple reason, it is recommended to have the following permalink structure:/%post_id%-%postname%/