Why Do Permalinks Need to End With %postname% ? (6 posts)

  1. ventrilqstman
    Posted 4 years ago #

    I just read in the permalinks page that we need to end with the post name (%postname%) or ID. But I can't figure why or what happens if we don't.

    I have a site (f164.com/journal) that I set up previously that uses /%postname%/%monthnum%/%year%/ and it seems to work. Can someone explain why we need to be limited to ending with %postname% vs closing with a date, etc. Is the way I'm doing it breaking something that I'm not aware of.


  2. They don't NEED to, they just ... do because that's how we think :)

    Also if you go to domain.com/2011, you'll get ALL the posts from 2011, so logically having a post go YYYY/MM/POSTNAME follows from that. Human readable and follow-able.

    Nothing will break if you do it your way though.

  3. ventrilqstman
    Posted 4 years ago #

    Makes sense. It just seemed as if it was made an important issue in the codex. Thanks for the info.

  4. Before 3.3, having a URL of (or starting with) %postname% would seriously slow your site down. Today, not as horrible :)

  5. Jorge
    Posted 4 years ago #


    I experimented with permalink structures in the past and once set it to end with a file extension like %postname%.html to blur the permalink structure to the bouncing user. I don't do it anymore on production sites but recently I tried it on my localhost resulting in a lot of 404s.

    My question is: what's up with ending the permalinks with a file extention, like %postname%.html, .htm, .shtml, .jhtml, etc.? Is it OK to use or not recommended?

  6. Never recommended to use a filetype with WP, especially since it's like the cake. A lie.

    Just end with %postname%

    A user's gonna figure out the structure once they visit your site, and remember you WANT people to remember your URLs so they can come back and find stuff!

Topic Closed

This topic has been closed to new replies.

About this Topic