Google's John Mueller says raw and percent-encoded brackets are different URLs and recommends using one form across links, canonical tags, and sitemaps.
Raw square brackets in a URL and their percent-encoded version, %5B and %5D, are different URLs, Google Search Advocate John Mueller said on Bluesky Monday. He wrote that he would have assumed they were equivalent and that he “probably gave people the wrong answer on this in the past.”
Google will crawl both versions, he said; if it finds they contain identical information it will eliminate duplication and pick one version; he recommends you choose one format to utilize across all links, canonical tags, sitemaps, and your structured data. The rules for duplicate formats apply equally to spaces, plus signs, and “%20,” he said.
Mueller traced the difference to RFC 3986, the internet standard for URI syntax, which puts brackets and plus signs in its reserved set of characters. Under Section 2.2, URIs that swap a reserved character for its percent-encoded version “are not equivalent.”
He was responding to Vanessa Fox, an ex-Google employee who developed Google’s Webmaster Central; she had asked in a Bluesky reply (after asking the question in the comments of the first Non-Canonical Cabinet episode) if Google treated the encoded form of a URL as a different URL. She provided examples by using both ?filter[]=123 and ?filter%5B%5D=123 (one in links; the other when identifying canonical versions). The JavaScript check he made then compared these two URLs and returned false.
He pointed out that the use of raw brackets in a query string is also technically invalid according to RFC 3986; this is because RFC 3986 restricts the use of brackets to the hostname, for wrapping raw IPv6 addresses.
Source link







