As a rule of thumb, make sure a user can understand what your page is about by looking at the URL. That means you don’t need to include every single preposition or conjunction. Words like “and” or “the” are just distractions and can be stripped of the URL altogether. Just as users can understand what a topic is about without these short words, Google will derive all the meaning it requires too. It would help if you also avoided keyword repetition within URLs. Adding the same keyword multiple times to increase your ranking chances will only lead to a spammy URL structure. An example of this unnecessary repetition would be: https://domain.com/whiskey/irish-whiskey/jameson-irish-whiskey/ Jameson-Irish-whiskey-history The first two uses of the main keyword make sense, but the third and fourth are overkill.
A few additional points to bear in mind on this topic:
Case Sensitivity: It is surprisingly common to find multiple versions of the same URL, with one all in lower case and the others using occasional capital letters. Use canonical tags to mark the lower-case URL as the preferred version or, if possible, use permanent redirects.
Hashes: These can be useful to send users to a specific section of a page but restrict their use in other circumstances if possible. If the content users are sent to after the # symbol is unique, make it available via a simple URL.
Word Delimiters: Stick with hyphens to separate words within your URL strings. Underscores will serve to join two words together, so be wary of using these.
URL Length: After 512 pixels, Google will truncate your URL in search results pages. A good rule of thumb is to keep y0ur URLs as short as possible without losing their general meaning.
This one can be harder than it sounds, depending on the content management system you use. Some e-commerce platforms will automatically spit out character strings that leave you with URLs like: https://domain.com/ cat/?cid=7078. These are a bit unsightly, and they also go against the rules we’ve been outlining above. We want static URLs that include a logical folder structure and descriptive keywords. Although search engines have no problem crawling or indexing either variant, it’s better to use static URLs rather than dynamic ones for SEO-based reasons. The thing is, static URLs contain your keywords and are more user-friendly since one can figure out what the page is about just by looking at the static URL’s name. So how do we get around this? You can use rewrite rules if your webserver runs Apache and some tools like this one from Generate.
Relative URLs Vs. Absolute URLs
There are different fixes for different platforms (some more complex than others). Some web developers make use of relative URLs, too. The problem with relative URLs for SEO is that they are dependent on the context in which they occur. Once the context changes, the URL may not work. For SEO, it’s better to use absolute URLs instead of relative ones since the former is what search engines prefer. Now, sometimes different parameters can be added to the URL for analytics tracking or other reasons (such as sid, UTM, etc.) To ensure these parameters don’t make the number of URLs with duplicate content grow over the top, you can do either of the following: Ask Google to disregard certain URL parameters in Google Search Console in Configuration > URL Parameters. See if your content management system allows you to solidify URLs with additional parameters with their shorter counterparts.