By default, WordPress uses URLs like http://example.com/?p=123. These URLs aren’t SEO friendly. Most WordPress site owners prefer “Pretty Permalinks,” which are SEO-friendly URLs. These URLs include keywords, post titles, categories, and tags. In this article, we’ll show you how to set up Pretty Permalinks in WordPress and enhance your website’s SEO.
How to Enable Pretty Permalinks in WordPress
To set up Pretty Permalinks on your WordPress site, follow these steps:
- Go to Your WordPress Dashboard: Log in to your WordPress admin area. This is usually found at http://yourwebsite.com/wp-admin.
- Navigate to Settings » Permalinks: In the left-hand menu, hover over “Settings” and then click on “Permalinks.”
- Choose Your Preferred Permalink Structure:You will see several options available:
- Plain: http://example.com/?p=123 – This is the default setting and is not SEO friendly.
- Day and name: http://example.com/2023/07/29/sample-post/ – Includes the date and post name in the URL.
- Month and name: http://example.com/2023/07/sample-post/ – Includes the month and post name.
- Post name: http://example.com/sample-post/ – This is the most SEO-friendly option.
- Click Save Changes: After selecting your preferred structure, click the “Save Changes” button at the bottom of the page.
Permalink Settings in WordPress
You will see several options to choose from:
Choosing a Permalink Structure
Most SEO experts agree that the best permalink structure uses the post name in the URL. The default options include:
- Plain: http://example.com/?p=123
- Day and name: http://example.com/2023/07/29/sample-post/
- Month and name: http://example.com/2023/07/sample-post/
- Post name: http://example.com/sample-post/
Numeric permalinks are better than plain ones but not as good as those with post names.
Customizing Permalinks
You can create your own permalink structure using special tags like:
Tag | Description |
%year% | Four digit year of post, e.g. 2024 |
%monthnum% | Two digit month of post, e.g. 07 |
%day% | Two digit day of the month, e.g. 29 |
%postname% | Sanitized post title, e.g. sample-post |
%category% | Sanitized category name, e.g. wordpress-tutorials |
We recommend using %postname% and %post_id% for individual posts and %category% for category archives.
Troubleshooting Pretty Permalink Structures
Sometimes, your server might not support Pretty Permalinks. Here are common issues and solutions:
1. Incorrect File Permissions
Incorrect permissions stop WordPress from creating or writing to the .htaccess file. Connect to your website using an FTP client, ensure it shows hidden files, and locate the .htaccess file. If it doesn’t exist, create one and copy the rewrite code from the Permalinks settings.
2. mod_rewrite Module Not Available
The mod_rewrite module must be enabled on your server. Contact your hosting provider to enable it.
Updating .htaccess File
If WordPress cannot write to the .htaccess file, you will see a notice on your Permalink settings page. In such cases, you will need to manually update the .htaccess file by adding the rewrite code provided in the settings.
Benefits of Pretty Permalinks
Pretty permalinks offer several advantages:
- User-Friendliness: Easier for users to read, remember, and share.
- SEO Improvement: Helps search engines understand your content better, improving rankings.
- Professional Appearance: Makes your links look clean and professional.
Example of Pretty Permalinks
Compare these URLs:
- Ugly URL: http://example.com/?p=123
- Pretty URL: http://example.com/how-to-set-up-permalinks-in-wordpress
The pretty URL is much more informative and user-friendly.
Using Pretty Permalinks for Affiliate Links
If you’re an affiliate marketer, pretty permalinks can also make your affiliate links look cleaner. For example:
- Before cloaking: http://example.com/products/?product_id=123&affiliate_id
- After cloaking: http://www.yoursite.com/refer/productname
Plugins like Pretty Links and ThirstyAffiliates can help you achieve this.
Conclusion
We hope this guide helps you set up Pretty Permalinks in WordPress. These steps will boost your site’s SEO and provide a better user experience. For affiliate marketers, you might also want to learn how to cloak affiliate links using plugins like Pretty Links and ThirstyAffiliates. This will make your URLs look cleaner and more professional.
FAQs
Why should I set up “pretty” permalinks?
Pretty permalinks make your URLs more user-friendly and SEO-friendly. They are easier to read, remember, and share.
Can I customize my permalink structure?
Yes, you can customize your permalink structure using predefined tags or creating your own format.
Will changing permalinks affect my existing content?
Yes, changing permalinks can impact existing links. WordPress sets up redirects for most changes, but it’s recommended to update internal links and notify search engines.
What is the best permalink structure for SEO?
The “Post name” structure is generally considered the most SEO-friendly.
Can I change permalinks on an established website without issues?
Yes, but be cautious. Use tools like AIOSEO to set up redirects, update internal links, and inform search engines to avoid SEO impacts.
How do I create a custom permalink structure?
Go to Settings » Permalinks. Choose the “Custom Structure” option and enter your desired format using placeholders like %postname%. Click “Save Changes” to implement the custom structure.