It is possible to implement onsite SEO in WordPress without ever using a plug-in. This not only simplifies your SEO onsite implementation, but it’s much safer for your blog. A lot of plug-ins in WordPress have security exploits associated with them. Even though the WordPress core files are constantly being improved by the Wordpress team, the plug-ins are individually maintained by developers outside of WordPress.
Thus, if the developer has failed to update the plug-in over time, it can fall victim to security vulnerabilities that could in turn result in your WordPress website being compromised by hackers. Like all code editing, it is extremely important that you back up your original WordPress theme files before making any changes as suggested in this tutorial. This way, if some tweaks don't work for your template, you can easily changes back to the original code.
The WordPress Title Tag
The default title tag in WordPress may need some adjustment. You might want to remove the redundant words in the title in the hope of giving more emphasis to your true keywords. For example, in the default WordPress title:
Five Serious PHP Development Mistakes Commonly Done by Websites | Test wordpress 3.0
You might want to remove the repetitive “Test Wordpress 3.0” in all of your WordPress posts and pages. On the other hand, you want to assign a specific title tag to your WordPress front page that is unique to all of your pages.
To solve this issue without a plug-in, implement the code below to the <head> section of your Wordpress template. Follow the steps below:
1. Log in to your WordPress admin panel.
2. Go to Appearance and click “Editor.”
3. Replace the following default PHP code below:
<title><?php /* * Print the <title> tag based on what is being viewed. */ global $page, $paged; wp_title( '|', true, 'right' ); // Add the blog name. bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); ?></title>
With this:
<?php if (is_front_page()) {
// Homepage title tag
echo "<title>This is your homepage title tag</title>"; } elseif (is_single()) {
Before saving the changes, make sure you specify your ideal WordPress homepage/front page title tag. You can specify it by replacing the text “This is your homepage title tag” in this line above:
<?php if (is_front_page()) {
// Homepage title tag
echo "<title>This is your homepage title tag</title>";
What is the result of this process?
1. You can assign any front page title tag you want.
2. The post title as well as the page title are now entirely unique and do not contain the repetitive “Test Wordpress 3.0.”
3. You can customize the title tag for your 404 page.
SEO Friendly URL Permalink Structure
By default, WordPress does not implement any SEO friendly URLs. For example, the URL should look like this:
http://www.yourdomain.com/?p=199
This URL structure does not contribute to your onsite SEO score. To do this, you can simply take advantage of WordPress's built-in permalink functionality. This is best done before Google has indexed your website, and before you launch your website on the Internet.
It is not advisable to implement a change in the permalink structure if you have already launched your website and a lot of your blog posts are already ranking in Google.
Follow the steps below:
1. Log in to your WordPress admin panel.
2. Go to Settings and click “Permalink.”
3. Under “Common settings,” you'll see that the settings are at “Default.” For example: http://www.yourwebsite.com/?p=123
4. The most recommended permalink structure to give your WordPress pages is to post a static HTML extension; this might not work in all templates, but you can it a try. To do this, select “Custom Structure” under “Common Settings,” and then, in the box beside “Custom Structure,” put this:
/%postname%.html
For example, it looks like the image below:
5. Click “Save Changes”.
What is the result? The URL will be rewritten from: