URLs, Redirects, and Aliases on WWW
An alias is a name for the content, and is the basis for a page's URL. In the WebCMS, default aliases are based on the page title.
- Aliases in the WebCMS
- How WebCMS Generates URLs
- What URLs for Published WebCMS Content Look Like
- Web Area URL Generation
- URL Overwrites
- Redirects
Aliases in the WebCMS
An alias is a name for a webpage that is written in "friendly language" (it does not reference the web page’s node number). When a webpage is created in the WebCMS, an alias is automatically assigned to a page based on the title field.
The URL will appear as: https://www.epa.gov/web-area-name/page-title.
You may have a need to change the default alias. Common reasons to do so are:
- Prefer a shorter alias
- Want a more “marketable” alias
- Redirect a retired a web page somewhere
- Changing the web page’s title (which will result in changing the pages current alias)
The www team can employ several different methods to help direct web traffic including:
1. Creating multiple redirects for one web page
2. Redirecting old alias to a new webpage
3. Overwriting an alias
When requesting help from the WebCMS Support <web_cms_support@epa.gov> team about redirects or aliases, describe the desired “end result” you want and let the WebCMS Support team recommend a solution.
How WebCMS Generates URLs
- There is no capitalization in URLs. Everything is lower case.
- There are no special characters or punctuation in URLs, other than hyphens ("-") between words.
- This restriction is not new. Using punctuation or special characters in URLs is poor practice.
- "stop" words are removed from the URL: a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with
- The total length is no more than 100 characters. That includes the “web-area-name/” part before the page title part.
- You may find that you have less than 100 characters, because the system is designed to stop at spaces rather than truncate words.
What will my URLs look like when published from the WebCMS?
The URLs will be in the form: https://www.epa.gov/web-area-name/page-title.
- Use www.epa.gov URLs in press releases and other communication products.
- The WebCMS is a flat structure, with no directories, meaning each page relates directly to its web area with nothing in-between.
- The WebCMS takes the page title, removes stop words, and replaces spaces and illegal characters with a hyphen.
- It is recommended that you don't modify the titles just to get shorter URLs.
- The title should clearly define the content on the page.
- Good titles help in search ranking, as well as helping users identify and select what they need from search results.
How WebCMS Generates URLs for Web Areas
Web Area Title
This is the web area name. It will appear as the page title on the web area homepage.
- Example 1: The title on the homepage of the New Bedford Harbor Web area is: "EPA Cleanups: Communities around New Bedford Harbor."
- Example 2: The title on the homepage of Border 2020 is: "US-Mexico Border 2020."
Web Area Short Name: Example 1
If you use a short name for your web area, the URL for your web area will be generated from the short name.
- Title: EPA Cleanups: Communities around New Bedford Harbor
- Short Name: New Bedford Harbor
- The URL is www.epa.gov/new-bedford-harbor (derived from the short name).
- The name at the top of child pages in this web area is "New Bedford Harbor"
- If using the internal link tool, the page will be found under "New Bedford Harbor" and not under "EPA Cleanups: Communities around New Bedford Harbor"
- The full title is used only on the homepage
URL Overwrite: Example 2
Web Areas
For web areas, you can request a URL overwrite. For example, use "nbh" if you want the URL to be www.epa.gov/nbh instead of www.epa.gov/new-bedford-harbor. You can also use this to override the removal of stop words. Overwrites for web area URLs require permission from ODC.
- Title: "U.S.-Mexico Border 2020 Program"
- Short Name: "Border 2020"
- URL overwrite: usmexicoborder
- The URL is www.epa.gov/usmexicoborder, rather than www.epa.gov/border-2020
Pages
You can also create a URL overwrite for individual pages. If you have the right privileges, on the page edit screen, you will find a field called "Machine name." Whatever you enter into this field will override the default URL generated from the page title.
Redirects
Aliases vs. Redirects
Redirects are not the same thing as aliases. Instead, they're alternate ways to get to the same page. The final URL (the one you see in the address bar of the browser) is the alias. For example, www.epa.gov/dfe (the redirect) redirects to www.epa.gov/pesticide-labels/learn-about-design-environment-dfe-certification (the alias).
Top Level Redirects
Redirects are particularly helpful for printed materials and presentations where a shorter URL is useful. If you want a redirect like the /dfe example (e.g., where the web area portion of the URL is different), it is required to get permission from the Office of Digital Communications (ODC). If you want to create a redirect where the page title is different, it is not required to get permission from ODC. In both cases, however, the changes must be done by WebCMS Support.