0

I'm taking form values in a URL Get method & form values may contain spaces.

I'm sending values (key=555) and (drink='Red Bull') - note that there is a space between Red and Bull

The Chrome browser automatically makes the space as a + plus sign and the URL becomes:

https://example.com/getformdata.php?key=555&drink=Red+Bull - URL1

All good till here. As per URL encoding the space character: + or %20? and When should space be encoded to plus (+) or %20?. These two thread say that plus sign is good for form queries, & %20 is good for URLs.

The situation is - I am also using the same URL (URL1 - https://example.com/getformdata.php?key=555&drink=Red+Bull) as the canonical URL for that getformdata.php page for indexing in search engines.

From SEO point of view, should I replace the space with plus sign in the canonical URL? or should I replace space with %20? i.e. should the canonical URL be https://example.com/getformdata.php?key=555&drink=Red+Bull or should it be https://example.com/getformdata.php?key=555&drink=Red%20Bull ?

Aquaholic
  • 863
  • 9
  • 25
  • I would recommend using the %20 encoding for spaces in URLs. This is because the %20 encoding is standard for representing URL spaces and is well supported by all major web browsers and search engines. – Maniac Apr 23 '23 at 20:01

0 Answers0