404 Error After Changing Permalink Settings to /%postname%/

how to set up 404 error page

I suddenly recalled about a new webhosting account I purchased almost a month ago. I got a free domain name with the account, but I forgot about it thereafter. So, I came back to it and started fiddling with the control panel and set up wordpress for the primary domain. Now, this ought to be a piece of cake as this is not the first time I’ve done this.

Sure enough, everything was a breeze until I came to the ‘Permalink Settings’ where, as I’ve always done with all my sites, I changed from ‘Default ‘ to ‘Custom Structure’ – /%postname%/. On checking the result of my tweaking, I was met with a 404 error page on the post I made. What the…? This has never happened to me before… well, at least in my other webhosting account. Is this a webhost thingy?

Searching google, I realized this is something not uncommon among wordpress users. There were a few who offered solutions. I also noticed some who suggested that I look into the htaccess file. Not very conversant about this file, I tried to evade the issue and searched for more non-geeky solutions. On finding none, I got back to the ‘Permalink Settings’ section in my wp dashboard and found that indeed, there was a “You should update your .htaccess now.” notice right below the ‘Permalink Settings’ heading. And on the bottom of the page was the suggested code block to use.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Well, knowing that my wp site is new and there’s not much to lose anyway should my htaccess attempt goes haywire, I proceeded with creating the htaccess file and uploaded it to my new site. Voila! As most of us would say, it ‘worked like a charm’.

Why, after so many wp updates, can’t the wordpress developers just make the ‘/%postname%/’ structure the default, inasmuch as many seo-savvy wordpress users use this structure anyway? I got this feeling that this has actually been overlooked by the the wp developers. The ‘/%postname%/’ structure is easy for both newbie and ace and all others in between. And it’s a proven fact that search engines prefer this structure.

What do you think?

How to Set Up a 404 Error Page


    1. A very minor adjustment indeed for them, but like I said, it must have been just overlooked. Someone needs to knock on their door and tell them. 🙂

  1. That’s indeed strange, since I cannot figure out what the point of this is. Maybe WP creators are way too lazy for this.

    1. Hi Alan, there are a lot of instances here where I post something more to myself than to readers. There are experiences which I just want to post for future references. So, if a reader sometimes doesn’t get the gist of the post, it could be that I have kept some information to myself, unwritten, and thus the point is only clear to me. 🙂 For that I apologize.

      If you mean the point of the wp developers not embracing the fact that the/%postname%/ structure is indeed seo friendly, it could be that they, like Rhys, do not believe in the seo fuss that a lot of bloggers make about it, or, like you said, they are just too lazy to take action.

  2. I’m not a big fan of this structure for a number of reasons:-

    a) It’s not as great as SEO as people think. Especially now as speed is a ranking factor. WordPress advises against using this structure as it puts strain on the database. Of course if you’ve a fast server it’s not a problem.

    b) The second reason is because if I’m finding out something – say for SEO – then I’d like to read writings that are current, rather than in the past. The date helps me see this 🙂
    Rhys´s latest blog post ..Social Media Day Manchester – smdaymcr – Thoughts

    1. Cool. In my readings on the net about this structure, I’ve always only encountered praise about it. I’m always on the look out for opposing views on any matter and it got me excited to see one on the issue of the /%postname%/ permalink.

      Actually, the only itch I have about the default permalink structure is where a random number is assigned to the post. It doesn’t give you any idea what the post is about. Then again, I’m still learning SEO. 🙂 The /%postname%/ structure seem to make sense on most fronts, except for what you pointed out regarding the strain it puts on the database.

  3. Fantastic advice, had the same problem, uploaded this code to my htaccess and it worked perfectly.

    Thanks so much!

Comments are closed.