How to Encode an Apostrophe in a URL

It is not possible to use an apostrophe within a URL you assign to a page or post on your website, even if an apostrophe appears in the page's or post's title. Encode the apostrophe within the URL to ensure readers can access the page. If you attempt to place an apostrophe within your URL, clicking its link takes readers to a "Page Not Found" error.

Type out the title of the page into a desired URL, leaving the apostrophe intact. For example, if the page title you wish to use is "Chocolate's Many Flavors," do this as follows:'s-many-uses/

Replace the apostrophe with the HEX code for the character, which is %27. For the example URL:

Save the file. Open your home page in a new tab or window, then click the link to the file whose URL contains and apostrophe. Notice that it opens without incident.

Most recent