Short URL guidance
Only Digital Services staff can create short URLs. Request a short URL for your page.
URLs, also called your web addresses, tell your web browser where to find your web page.
Web addresses are linked in buttons, inline text, QR codes, or in social media posts, so most people never notice them.
Most people never think about your web addresses. URLs are like content for robots not for people.
Short URLs can be useful when a URL will be on a printed campaign or for department pages.
Table of contents
Short URLs are redirects
We use redirects for short URLs to help users navigate between mediums, like from a poster to a webpage, or a website mentioned in a speech. Redirects let users type in the short URL, but then show the full URL as the page is loaded.
All URLs on SF.gov are built to be as short and clear as possible, so you should only need a further-shortened URL in unusual cases.
The short URL needs to be:
Short
Easy to say
Difficult to misspell
a to z only, no capital letters
No hyphens
No complex characters, like &, $, #
Because we can’t space words in short URLs we recommend that you only use one or 2 words.
Short URLs need to make sense in their situation, and make sense over time. Do not recycle URLs from one campaign to another, because you won’t get clean numbers on your social tracking.
We suggest using “covid” or “corona” in URLs during the pandemic, to differentiate them from business as normal.
You should focus campaign efforts on one URL, not across several. If you have a complex campaign, link to subsidiary pages. Don’t market or put more than 1 URL on a poster or in a tweet. That way we can track the success of your efforts.
Yes | No |
sf.gov/departments/mayors-office-housing-and-community-development | |
sf.gov/events/july-4-2021/fourth-july-fireworks-show Because this is a yearly event, we’ve added the year in the short URL, so it doesn’t break every year. | |
If you have a short URL, we will try and make sure you have variations on that URL as well. |
|
Campaigns
Campaigns get short URLs as standard, but will still have hyphens between words. So the Dear SF campaign has a URL of https://sf.gov/dear-sf, but we’ve also made a redirect from sf.gov/dearsf to https://sf.gov/dear-sf, in case users mis-type.
Department names
We will create a short URL for departments. All departments and larger divisions can get short urls for their department landing pages. The URL must be for the name of the department, not the topic.
Good short URLs for a department | Not specific enough |
Drawbacks of short URLs
Creating a short URL has drawbacks.
Consistent use of the full URL will increase your rankings in search engines. You will hurt your search engine ranking by using short URLs too often.
If you say a URL out loud, people do not know where or if you type in dashes.
In analytics, you cannot track the referral source of a short URL.
Short URLs can cause “collisions” if two different pages want the same short URL, like sf.gov/get-food-help for different programs. It is simplest to keep the separate programs on separate, full URLs.
Short URLs for social media
Social media platforms automatically shorten your URL. You do not need to use a URL you shortened.
URL on Twitter: sfhsa.org/services/healt…
Full URL https://www.sfhsa.org/services/health-food/calfresh/applying-calfresh
References
https://www.searchenginejournal.com/technical-seo/url-structure/#close
Initial URL decisions for SF.gov (out of date)
Guidance on who can use the SF.gov URL