Can You Have Quotation Marks and Apostrophes (Single Quotes) in Your Permalink URL?

Can quotation marks (double quotes and single quotes) and apostrophes be included in your WordPress permalink URLs? I am not an authority on this, but I found a case recently where an apostrophe from a post title was being included in the permalink and it was causing the permalink to produce a “Page Not Found” 404 error. Removing the apostrophe from the permalink fixed the problem.

By the way, if you are looking for a solution to the problem of multiplying apostrophes and quotes in your WordPress posts, click here: How to Fix WordPress Multiple Apostrophe.

The example looked something like this. This is not the actual URL and title, but it did include “Montezuma’s Revenge”. Maybe that’s what the server found offensive! šŸ˜‰

http://www.example.com/2009/blah-blah-montezuma’s-revenge-blah-blah/

The title of the post was “Blah Blah Montezuma’s Revenge Blah Blah” (without the double quotes).

As you probably know, you can put apostrophes and quote marks in post and page titles, but if your site is hosted on WordPress.com, those will be removed when WordPress creates the permalink URL. [UPDATE: No. Double quotes will not necessarily be removed, as you can see from the URL for a recent post on WordPress Security.]

The problem with an apostrophe in a URL happened on a self-hosted WordPress installation, and, as a matter of fact, it is installed on a Windows IIS server, rather than the usual Linux/Unix Apache server.

I’m not an expert at server issues, but I do know that sometimes things like this happen with WordPress only on Windows servers. For instance, when you enable permalinks on Windows, sometimes the URLs will include “index.php” – like http://www.example.com/index.php/2009/blah-blah-montezuma’s-revenge-blah-blah/ when this normally never shows up in a URL.

At any rate, when I used the Permalink Edit button (under the post/page title window in the WordPress Editor) to remove the apostrophe, the problem went away. The permalink URL now looks like: http://www.example.com/2009/blah-blah-montezumas-revenge-blah-blah/

Oddly enough, I can now get to the page from both URLs
http://www.example.com/2009/blah-blah-montezumas-revenge-blah-blah/
and
http://www.example.com/2009/blah-blah-montezuma’s-revenge-blah-blah/

No idea why that would be, but who cares since there’s no longer a 404 error.

Changing Permalinks and Categories Retroactively (on a WordPress site with lots of posts)

A new aquaintance asked me about changing permalinks. He has a successful blog with lots of posts, and he wants to be sure to keep all the link juice associated with the old URLs for those posts.

His site had a kind of default permalink structure that did not use English language words in the URLs. He wanted to change this so that it would use English words, like Business Blogging 101 does.

There’s a plugin for that called WordPress Redirection.

He also wanted to change his category names, since he had been using only one “general” category for all his posts. Here’s my advice on that point.

I’m not sure of all the implications of changing categories retroactively. I know that it’s possible to simply create new categories and assign them to old posts. You can delete an old category and, if that’s the only one assigned to a post, WordPress will ask which category you want to replace it.

Before going further with any of this, be sure to back up your database and also use Tools > Export to export an .xml file of your site. You should back up files in the wp-content directory regularly as well (although that’s not directly affected by these changes).

Some people choose to exclude categories from Google using noindex to avoid duplicate content issues. IMO, I don’t think you need to worry about this. Google has gotten much better at ignoring duplicate content.

If you are very keen on increasing search optimization using categories, you can remove the “general” cat and replace it with more specific cats on each post. I favor using only one category per post. You can use tags for any other keywords you want to associate with posts.

If you have lots of “general” posts, I would not worry about going back to do this. Leave the general category. Create new, more specific categories, and use those going forward. The most important thing for blog SEO is that you keep producing good content on a consistent basis and get lots of comments from readers like you are doing. That will also lead to more people linking to you. The SEO significance of categories on older posts is not nearly as great as these things.

Lorelle VanFossen is a great WordPress resource, in general, and about categories and tags among other things.

%d bloggers like this: