{"id":234,"date":"2007-03-28T10:58:55","date_gmt":"2007-03-28T15:58:55","guid":{"rendered":"http:\/\/teamtutorials.com\/web-hosting-tutorials\/clean-url%e2%80%99s-with-wordpress"},"modified":"2014-08-14T11:46:53","modified_gmt":"2014-08-14T15:46:53","slug":"clean-url%e2%80%99s-with-wordpress","status":"publish","type":"post","link":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress","title":{"rendered":"Clean URL’s with WordPress"},"content":{"rendered":"

This tutorial will show you how to setup WordPress to use clean URL\u2019s. Using clean URL\u2019s is one of the first step in Search Engine Optimization (SEO). Besides that, they just look better. <\/p>\n

The default WordPress URL structure is: http:\/\/www.yoursite.com\/?p=123. What does p=123 even mean? Well, I would guess that it is the post id, but what does your reader see? A URL like this will be much better: http:\/\/www.yoursite.com\/category\/title-of-the-post be much better. It will have some meaning to your readers, and more importantly, search engines. The title is one of the most important things a search engine will look at. The better your site places on the SERPs (search engine results page), the more traffic you will drive to your site. Of course this is only one step in SEO, but is a good start.<\/p>\n

There is one thing to keep in mind before you change your permalink structure. You will lose inbound links from other sites and search engines. If you have a large amount of traffic from direct addresses or bookmarks, you will not have to worry about this. If you are just starting out (as we are here at www.teamtutorials.com), I would recommend going with clean URL\u2019s from the start. It is really simple to make a custom permalink structure for WordPress.<\/p>\n

First, if your .htaccess file is writeable, WordPress is supposed to update it automatically. If not it will give you the code to cut and paste into your .htaccess file. I have had problems letting WordPress edit the .htaccess file in the past (it never seems to update it), so I will edit it manually.<\/p>\n

Log on to your WordPress account as the administrator and click on Options and then Permalinks. You should see a page similar to the one below.
\nClean URL\u2019s with WordPress<\/a><\/p>\n

As you can see, the default settings are select. We want to enable custom URL\u2019s so click the option button next to \u201cCustom, specify below\u201d.
\n
Clean URL\u2019s with WordPress<\/a><\/p>\n

Now we need to define the URL\u2019s. There are many variable that you can use, but I will choose to use the category and postname variables. If you would like to use something else (day, month, year, posted, subcategory, etc.) you may want to see the custom permalinks page on the Official WordPress site<\/a>. In the \u201cCustom Structure\u201d box, enter the following.
\n
Clean URL\u2019s with WordPress<\/a><\/p>\n

Now scroll to the bottom and click the \u201cUpdate Permalink Structure\u201d button.
\n
Clean URL\u2019s with WordPress<\/a><\/p>\n

Now, if you have a writeable .htaccess file, you can ftp to your site and check to see if .htaccess file was edited. If your .htaccess is not writeable, or WordPress didn\u2019t update it, you will need to enter the following code in the file and upload it to your site.<\/p>\n

\r\n<IfModule mod_rewrite.c>\r\nRewriteEngine on\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule ^(.*)$ .\/index.php\/$1 [L,QSA]\r\n<\/IfModule>\r\n<\/pre>\n

This will tell the server that when it see http:\/\/www.yoursite.com\/categiory\/post-title-here to rewrite it to http:\/\/www.yoursite.com\/index.php?somevariable , but the user will see the clean URL. <\/p>\n

To test it, make a new post or use an existing one. Click the link from your homepage to get to the permalink and look at the URL in the web browser. You should see the clean URL and the page should be displayed properly.
\n
Clean URL\u2019s with WordPress<\/a><\/p>\n

Here is our ugly default URL versus the clean URL for the same post.
\n
Clean URL\u2019s with WordPress<\/a><\/p>\n

Vs
\n
Clean URL\u2019s with WordPress<\/a><\/p>\n

This is an easy way to optimize your site for search engines and be easier on your readers eyes. If you have any questions, just leave a comment, I will answer as quickly as possible.<\/p>\n","protected":false},"excerpt":{"rendered":"

This tutorial will show you how to setup Wordpress to use clean URL\u2019s. Using clean URL\u2019s is on of the first step in Search Engine Optimization (SEO). Besides that, they just look better. You can see an example of these URL’s on sites like digg.com and more.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,23],"tags":[],"yoast_head":"\nClean URL's with Wordpress<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to setup Wordpress to use clean URL\u2019s. Using clean URL\u2019s is on of the first step in Search Engine Optimization (SEO). Besides that, they just look better. You can see an example of these URL's on sites like digg.com and more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url\u2019s-with-wordpress\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Johnathan Ward\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/teamtutorials.com\/#website\",\"url\":\"https:\/\/teamtutorials.com\/\",\"name\":\"Team Tutorials\",\"description\":\"Learn something new today\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/teamtutorials.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/clean-urls-with-wordpress-1.thumbnail.jpg\",\"contentUrl\":\"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/clean-urls-with-wordpress-1.thumbnail.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#webpage\",\"url\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress\",\"name\":\"Clean URL's with Wordpress\",\"isPartOf\":{\"@id\":\"https:\/\/teamtutorials.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#primaryimage\"},\"datePublished\":\"2007-03-28T15:58:55+00:00\",\"dateModified\":\"2014-08-14T15:46:53+00:00\",\"author\":{\"@id\":\"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9\"},\"description\":\"This tutorial will show you how to setup Wordpress to use clean URL\\u2019s. Using clean URL\\u2019s is on of the first step in Search Engine Optimization (SEO). Besides that, they just look better. You can see an example of these URL's on sites like digg.com and more.\",\"breadcrumb\":{\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/teamtutorials.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Clean URL’s with WordPress\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9\",\"name\":\"Johnathan Ward\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/teamtutorials.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r\",\"caption\":\"Johnathan Ward\"},\"description\":\"Johnathan Ward is an experienced developer and consultant that writes tutorials to help other developers. In his day job, he is an IBM Watson Consultant with several years of experience deploying and customizing Watson Explorer solutions.\",\"sameAs\":[\"http:\/\/johnathanward.com\",\"https:\/\/twitter.com\/spyderman4g63\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Clean URL's with Wordpress","description":"This tutorial will show you how to setup Wordpress to use clean URL\u2019s. Using clean URL\u2019s is on of the first step in Search Engine Optimization (SEO). Besides that, they just look better. You can see an example of these URL's on sites like digg.com and more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url\u2019s-with-wordpress","twitter_misc":{"Written by":"Johnathan Ward","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/teamtutorials.com\/#website","url":"https:\/\/teamtutorials.com\/","name":"Team Tutorials","description":"Learn something new today","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/teamtutorials.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#primaryimage","inLanguage":"en-US","url":"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/clean-urls-with-wordpress-1.thumbnail.jpg","contentUrl":"http:\/\/teamtutorials.com\/wp-content\/uploads\/2007\/03\/clean-urls-with-wordpress-1.thumbnail.jpg"},{"@type":"WebPage","@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#webpage","url":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress","name":"Clean URL's with Wordpress","isPartOf":{"@id":"https:\/\/teamtutorials.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#primaryimage"},"datePublished":"2007-03-28T15:58:55+00:00","dateModified":"2014-08-14T15:46:53+00:00","author":{"@id":"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9"},"description":"This tutorial will show you how to setup Wordpress to use clean URL\u2019s. Using clean URL\u2019s is on of the first step in Search Engine Optimization (SEO). Besides that, they just look better. You can see an example of these URL's on sites like digg.com and more.","breadcrumb":{"@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/teamtutorials.com\/web-development-tutorials\/clean-url%e2%80%99s-with-wordpress#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/teamtutorials.com\/"},{"@type":"ListItem","position":2,"name":"Clean URL’s with WordPress"}]},{"@type":"Person","@id":"https:\/\/teamtutorials.com\/#\/schema\/person\/3abea1fc71644afe035403357450b9d9","name":"Johnathan Ward","image":{"@type":"ImageObject","@id":"https:\/\/teamtutorials.com\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93d667fe5dc6df5c722e0df5eac14d40?s=96&d=mm&r=r","caption":"Johnathan Ward"},"description":"Johnathan Ward is an experienced developer and consultant that writes tutorials to help other developers. In his day job, he is an IBM Watson Consultant with several years of experience deploying and customizing Watson Explorer solutions.","sameAs":["http:\/\/johnathanward.com","https:\/\/twitter.com\/spyderman4g63"]}]}},"_links":{"self":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/posts\/234"}],"collection":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/comments?post=234"}],"version-history":[{"count":0,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/posts\/234\/revisions"}],"wp:attachment":[{"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/media?parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/categories?post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teamtutorials.com\/wp-json\/wp\/v2\/tags?post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}