Ajtacka
Ajtacka

Reputation: 23

URL-encoding slug containing literal "#" or "+"

I'm currently replacing numeric ids in a url with a slug created from a job title. My problem is, some slugs contain "#" or "++". Simply removing them will change the meaning ("C# developer wanted" -> "c-developer-wanted").

What is the best way around this?

My current thinking: Simply encoding those characters ("C%23-developer-wanted") is maybe the best option, but reduces the readability. Part of the reason for doing this is SEO - not my strong point - so I guess encoding is probably better than replacing it with a word ("csharp-developer-wanted").

Upvotes: 2

Views: 1100

Answers (1)

Rich Bradshaw
Rich Bradshaw

Reputation: 72975

Looking at results pages, encoded ones do reduce readability, so I'd replace a # with sharp. The title and description can of course include these characters, so it won't affect SEO much.

Two examples:

enter image description here

The top one replaces with sharp, the bottom one encodes it. They still come up though, as the include C# in the title or description.

I suspect that Google will treat a %23, # and sharp as the same internally for this type of search.

Upvotes: 1

Related Questions