WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

WordPress does a 301 from http://example.com/?p=100 to http://example.com/post-title/, but I thought a URL rewrite was different from a redirect and therefore this wouldn't result in a 301.

Can anyone clarify?

share|improve this question
up vote 3 down vote accepted

A rewrite enables http://example.com/post-title/ to translate internally to the proper query vars to load the requested post. The shortlink does a 301 redirect to the pretty URL because it should not be possible to access the same content from more than one URI. This is so a search engine won't index the same post under two URIs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.