Do you avoid using specific characters in friendly URL?

Updated by Brady Stroud [SSW] 1 year ago. See history

123

<introEmbed
  body={<>
When adding a friendly URL, please avoid using specific characters like `+ : # & , ) ( ! \ } {  @ / = $` (and so on) due to these reasons:
  </>}
/>
1. When adding a friendly URL, we meant to make it **friendly** and **easy** for the user to read and remember, and these characters add complexity

2. Some characters are unsafe characters, they will be encoded, which end up making the URL really messy and ugly. Example: **double quote (“)** will be encoded as **%22**.

### SharePoint

Some characters are reserved characters, which may not be supported by some features, based on our experience, “+" is not supported in “canonical" to redirect from **http** to **https**.

<asideEmbed
  variant="greybox"
  body={<>
    `http://ssw.com.au/rules/when-to-use-+1`
  </>}
  figureEmbed={{
    preset: "badExample",
    figure: 'Bad example - This URL will throw a 404 error rather than redirecting to https://',
    shouldDisplay: true
  }}
/>

<asideEmbed
  variant="greybox"
  body={<>
    `http://ssw.com.au/rules/when-to-use-plus-1`
  </>}
  figureEmbed={{
    preset: "goodExample",
    figure: 'Good example - Redirect works fine if the URL doesn\'t include “+"',
    shouldDisplay: true
  }}
/>

Acknowledgements

William Yin
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star