12
SEO Friendly URLs in WordPress By Brandon Himpfen

SEO Friendly URLs in WordPress

Embed Size (px)

DESCRIPTION

Learn how-to change WordPress URL structure to make them SEO friendly URLs.

Citation preview

Page 1: SEO Friendly URLs in WordPress

SEO Friendly URLs in WordPress

By Brandon Himpfen

Page 2: SEO Friendly URLs in WordPress

The Problem

By default, WordPress URLs look like this:

http://yourwebsite.com/?p=3

As you can see, WordPress uses web URLs which have question marks and lots of numbers in them.

By having SEO friend URLs, you will have a higher chance of ranking higher in Google and other search engines.

This is because you are replacing the question mark and numbers with keywords, which WordPress refers to as tags.

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 3: SEO Friendly URLs in WordPress

Requirements

Your server will have to have one of the following for SEO friendly URLs to work:Apache web server with the mod_rewrite module;

Microsoft IIS 7+ web server with the URL Rewrite 1.1+ module and PHP 5 running as FastCGI;

Microsoft IIS 6+ using ASAPI_Rewrite;

Microsoft IIS 6+ using Ionic ISAPI Rewriting Filter (IIRF); or

Lighttpd using a 404 handler or mod_rewrite.

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 4: SEO Friendly URLs in WordPress

Requirements (cont’d)

In addition, you will need to: 1. Have FollowSymLinks option enabled;

2. FileInfo directives allowed; and

3. An .htaccess file (which you can create or WordPress has the ability to create one).

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 5: SEO Friendly URLs in WordPress

How-to Create SEO Friendly URLs

1. Go to the WordPress login page and login.2. On the left side menu, look for “Settings.”3. A drop down menu will appear and then look for and click on

“Permalinks.”

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 6: SEO Friendly URLs in WordPress

Permalink Settings

You’ll be taken to a page that looks like this:

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 7: SEO Friendly URLs in WordPress

Permalink Settings (cont’d)

You will change the post and page URL structure under “Common Settings.”

Under “Common Settings” you can pick a pre-made URL structure.

The “Custom Structure” setting will allow you to make your own URL structure by using one or more tags.

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 8: SEO Friendly URLs in WordPress

Tags You Can Use

Here are the tags you can use to create your custom URL structure:

1. %year% – The year of the post, four digits, for example 2004.

2. %monthnum% – Month of the year, for example 05.

3. %day% – Day of the month, for example 28.

4. %hour% – Hour of the day, for example 15.

5. %minute% – Minute of the hour, for example 43.

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 9: SEO Friendly URLs in WordPress

Tags You Can Use (cont’d)

6. %second% – Second of the minute, for example 33.7. %postname% – A sanitized version of the title of the post (post slug field on

Edit Post/Page panel). So This Is A Great Post! becomes this-is-a-great-post in the URL.

8. %post_id% – The unique ID # of the post, for example 423.9. %category% – A sanitized version of the category name (category slug field on

New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.

10. %author% – A sanitized version of the author name.

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 10: SEO Friendly URLs in WordPress

Category and Tag Custom Structures

Under “Optional,” you can enter custom structures for your category and tag URLs

All you have to do is add a single word or words separate by dashes to the text boxes.

For example, using topics as your category base would make your category URLs look like this:

http://yourwebsite.com/topics/category/

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

Page 11: SEO Friendly URLs in WordPress

The .htaccess File

WordPress should be able to create the .htaccess file for you, but if it can’t, create the .htaccess file with the following contents:

Brandon Himpfen • Website: http://himpfen.com/ • Twitter: @brandonhimpfen

# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index.php$ - [L]RewriteRule ^login/?$ /wp-login.php [QSA,L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule>

# END WordPress

Page 12: SEO Friendly URLs in WordPress

The End

I hope you enjoyed this presentation!