I have seen many websites using slugs in their URL to boost SEO such as this:http://example.com/article/1543/how-to-boost-seo/I was thinking if I could do something like this instead:http://example.com/article/1543#how-to-boost-seoand specify it as the canonical URL. This article from Google says, It's a hint that we honor strongly. Does that include the fragment identifier, or would it be discarded?
How does Google treat hash fragment inside a canonical URL
seo;canonical url;hash
Fragment identifiers are traditionally used to identify a portion of document for client-side applications. As stated in the specification Google adopted:Traditionally, hash fragments (that is, everything after # in the URL)  have been used to indicate one portion of a static HTML document.  ...hash fragments are not part of HTTP requests (and as a result they  are not sent to the server)Consequently as this covers, the Googlebot ignores hash fragments by default. Therefore for this URL:http://example.com/article/1543#how-to-boost-seoGooglebot should just look at the resource returned by the server:  http://example.com/article/1543 while ignoring the hash fragment: how-to-boost-seo.So essentially the resource for the above URL is the canonical URL after normalization (i.e., removing the fragment).The purpose of using a slug is to identify a page as a human-readable keyword. Using a fragment confuses this purpose and obscures its readability:/how-to-boost-seo is a lot more readable than: /1543#how-to-boost-seoSo in short, using a fragment as a slug would not seem beneficial to users or search engines.