WordPress Short URL using Post ID (plus its Effect on SEO)
I recently changed this site’s permalink format from wplover.com/postname to wplover.com/post-id/postname. At first this is simply done because I’m curious, but it turns out there are a couple of advantages to this:
- Using post ID is good: “…it is best to start your permalink structure with a numeric field, such as the year or post ID.” (source)
I’ve read somewhere that /post-id/postname/ is faster than /postname/ to process because using the latter there is no difference between a Post and a Page permalink, so WordPress have to take the time to check for that as well. If you use /post-id/postname/, the link structure for a Page will be /pagetitle/ (without ID). Try as I might, I can’t find the source from this information, so please correct me if I’m wrong. - …and the whole point of this post: you can use yourdomain/post-id/ as a short url, useful to post to Twitter and the like. Here’s an example: http://wplover.com/632/
How will using that post-id based short URL affect SEO, though? To find out, I tried to dig into WordPress’ code that redirects the short URL into the actual URL. This is from wp-includes\canonical.php line 202 (as of WordPress 2.8.x):
if ( $do_redirect ) { // protect against chained redirects if ( !redirect_canonical($redirect_url, false) ) { wp_redirect($redirect_url, 301);
So they’re using 301 redirects according to that last line. This is the right way, SEO-wise:
301s are good for SEO value, while 302s aren’t because 301s instruct clients to forget the value of the original URL, while the 302 keeps the value of the original and can thus potentially reduce the value by creating two, logically-distinct URLs that each produce the same content (search engines view them as distinct duplicates rather than a single resource with two names). (source)
301 redirects tells search engines that that short URL and the full URL is the same and not a duplicate, which is good (because duplication reduces the value of both URL).
So, in essence, all’s good, godspeed, have fun with the short URL.

These easy to install the plugin from here SEO and you have such a problem does not http://www.undergroundtraininglab.com/
Thats so cool. I love this post u write…Will email some of my friends who interested in this…Thanks.