In this Article
- URLs and page names overview
- Edit the URL in Page Settings
- Create vanity URLs
- Vanity URL restrictions
URLs and page names overview
Composer allows you to give each page a custom name and URL. A page's web address - its URL - is automatically derived from its name. This is a short overview of how they work in Composer.
Below is a page called Apply Now. If this page were created at the "root" level of a site (just below the homepage in the site hierarchy), its URL would be www.[domain].com/apply-now.
However, a page's address is not derived only from its own page name. Pages that are located several layers deep in a site's hierarchy will also reflect the address of their "parent" pages in the URL.
Here's the actual structure surrounding the Apply Now page:
- Parent page: Notice that Admissions is at the parent level.
- Child page: Inquire Link and Apply Now are child pages beneath the Admissions parent page.
Because the Apply Now page is drawing its address from its own name AND that of its parent page, the actual URL for this page is www.[domain].com/admissions/apply-now.
This is found in the Page Settings gear in the bottom right corner. Here you can see not only how a page derives its URL from its own page name, but also from its parent. Direct URLs list any parent pages first, followed by the name of the page itself.
Edit the URL in Page Settings
The Page Settings window allows you to edit the very last portion of the page's URL - you can click on "apply-now" in the settings window and replace it with something else. This user-editable portion of the page's address is called the "slug." By default, the slug is simply the page's name, rendered in a web-compatible format (lowercase letters, with words separated by a hyphen.)
We can change this to whatever we want, for instance, changing "apply-now" to simply "apply." Doing so would change the page's URL to be "www.[domain].com/admissions/apply".
Important Note
Changing a page's URL does not affect its name. Likewise, after a page has been created, changing the page name will not automatically change its URL. You must edit the slug in order to modify the page's web address.
If you change a page's URL by editing the slug, that change will cascade down to any of its "child" pages.
Now, if we go back to the original "Apply Now" page, its URL reflects the new slug "updated-page-name", even though we never edited the Admissions URL directly.
Finally, notice the "link" icon to the left of the page URL. You can click on that icon to copy the page's complete URL to your clipboard, so that you can easily paste it in elsewhere.
Create vanity URLs
A vanity URL is a descriptive, memorable, and pronounceable URL often used to redirect URLs from one location to another URL that may be less easy to remember or enter. A vanity URL is a long URL that has been converted into a customized, shorter link. Two options for managing vanity URLs are creating a Redirects branch and using Redirects Manager:
Option 1: Create a Redirects branch
To create a simple URL for a page with a longer URL, for example "yourschool.org/apply" as a shortcut to "yourschool.org/admissions/online-application," you'll need to set up a redirect page in Composer. Here's how it works:
- Set up a branch in Composer by hovering over your main domain in Composer and clicking New Branch.
- Create a new page under the Redirects branch.
- Set it to be a Linked Page.
- Set the URL to whatever you'd like your short vanity URL.
- Make sure Internal Redirect is selected.
- Choose the page you'd like this vanity URL to point to.
Save and publish this new page, and your short URL should now redirect you to the page you set.
Option 2: Use Redirects Manager
You can use Redirects Manager for handling vanity URLs! This is a great alternative to creating a new Composer branch. Add them one-by-one or in bulk so that your community has an easier process for finding what they need on your site.
Vanity URL restrictions
There are a few restrictions to keep in mind when creating vanity URLs. For example, the use of only numbers (with no other characters) in a vanity URL is not allowed. Restricting the use of purely numerical slugs allows us to load pages and route site traffic more efficiently, while also helping enforce best-practice naming conventions. This means that mysite.com/2017 is NOT a valid URL, however, mysite.com/fundraiser2017 is perfectly acceptable. The use of special characters, including underscore "_" is also forbidden, as their use is not considered a best practice.
Comments
Please Sign in to leave a comment if you don't see the comment box below.