Permalinks are the URLs to the content you publish. Each permalink gives direct access to a specific page of your website (i.e. a post, a page, a product, a category, a section, etc.).
Why should I care about permalinks?↑ Back to Top
Because they are used to access your content.
- People enter a permalink in their browser address bar to open a specific page of your website.
- You use permalinks in your email newsletters or social media posts to provide direct access to your content.
- Other websites use permalinks to link to your content from their pages.
- Search engines use permalinks to fetch and index your content, and link to it in their results.
Note that changing a permalink doesn’t automatically update all external links pointing to it, so doing so will result in a 404 error. That’s why they are called permalinks: because they shouldn’t change, they are supposed to be permanent. So, the ideal scenario is to choose a permalink structure right from the start, and stick to it.
SEO-friendly URLs↑ Back to Top
SEO-friendly URLs are important because they can improve your chance to rank higher in search engines. They contain keywords related to their content, and are easy to read by both humans and search engines.
This is a plain URL. As you can see, it doesn’t provide any relevant information.
http://nicethemes.com/?p=123
This is a SEO-friendly URL. Note the post name, which is a relevant keyword.
http://nicethemes.com/sample-post/
WordPress lets you choose your permalink structure and, since version 4.2, the default one is SEO-friendly. Ideally, you should define your structure before going live, and then you should stick to it.
Configuring your permalink structure↑ Back to Top
Internally, the SEO-friendly URLs are handled by WordPress’ rewrite rules in your .htaccess
file. Luckily, configuring them from the admin is very easy.
- In your WordPress Dashboard, go to Settings → Permalinks.
- On Common Settings, choose your preferred permalink structure, or enter a custom one (you can use any of these tags).
- Click Save Changes. Your rewrite rules will be automatically flushed.
- That’s it! Your new structure should now be functional.
Changing your permalinks↑ Back to Top
As we stated before, if you change a permalink, or your whole structure, all the links already pointing to the affected URLs would lead to 404 errors. So, if you ever needed to do so, you must create a 301 redirect for each affected URL: that way, when a user enters your site using an old permalink, he or she will be automatically redirected to the new one, and will be able to browse your content normally. Note that you always lose your social media share counts, because social networks will not follow the redirects and always treat the new URLs as brand new pages.
When it comes to permalinks, you can’t be too careful. If your site has been online for a while and you’re not using a plain permalink structure, it’s probably best to leave it as it is. But, if that’s not an option and you’re not experienced with redirects, we strongly recommend to hire a professional to setup them properly. That way you will be sure that your users will never stop reaching your content.
White screens or 404 errors↑ Back to Top
If you’re experiencing problems like a white screen or a 404 error in a page that should be working fine, it may be related to a problem with the rewrite rules in your .htaccess
file. If that is the case, flushing them should solve the problem: to do so, just go to Settings → Permalinks and save the current options.