What makes a good URL slug?
A good slug is short, lowercase, uses hyphens to separate words, contains the target keyword and avoids stop words, numbers and special characters where possible.
Should slugs include stop words?
Generally no. Remove common words like 'a', 'the', 'and', 'or', 'in' from slugs. 'how-to-calculate-percentage' is better than 'how-to-calculate-a-percentage'.
What characters are not allowed in URLs?
URLs cannot contain spaces, <, >, #, %, {, }, |, \, ^, ~, [, ] or `. Use hyphens instead of spaces and remove all other special characters.
Should I use hyphens or underscores in slugs?
Always use hyphens. Google treats hyphens as word separators (best-tool = two words: best, tool). Underscores are treated as word joiners (best_tool = one word: besttool), which is bad for SEO.