URL Path Settings

The URL PATH SETTINGS is where you set the URL of your page.

Automatically Generating the URL

When you click the arrow to open these setting you will notice two fields. The first is a checkbox that as a default, is checked. Leaving the box checked will automatically generate your URL based on the TITLE field that you filled out.

Screenshot of the URL path settings open

If your page has a TITLE of “testing the title of the page”, this will result in a URL that is:
https://www.middlebury.edu/institute/testing-title-page

The system will take your title and automatically generate a URL, removing any stop words (e.g. words like - and, the, of, it, etc.). The system also adds a hyphen between each word.

You will also notice that the URL is created at the “root” of the website. That is, at /institute/. This is because we did not also go in to MENU SETTING and select a menu for the page (which is optional). So the system thinks we want this page to live at the “root” and so it has created a URL to reflect that.

If you were trying to add a page to an existing section of the website, this would be a problem.

To solve this, we can do two things.

  1. We can go back to our MENU SETTING and configure the setting to add the page to a menu and hit save. If “Generate automatic URL alias” is left checked then the URL will be updated automatically, correcting the URL. As an example, if I edit my MENU SETTINGS and add the page to the Admissions Menu, then the URL would update to be: https://www.middlebury.edu/institute/admissions/testing-title-page
  2. Alternatively, I may not want the page to appear in the menu, but I DO want the URL to be in a particular section and I want the menu for the page to appear. In that case, I would need to manually create a URL alias (which we will talk about below).

Manually Creating the URL

To manually create a “friendly URL” or what we call a URL alias, you first must uncheck the checkbox we’ve been discussing and then manually type in a new URL. Anything you type will appear after /institute/ when the URL is created.

URL Path Settings with Alias

So if you typed in:
/heres-an-example-page

The resulting URL would be: https://www.middlebury.edu/institute/heres-an-example-page

If you typed in: /admissions/heres-an-example-page

The resulting URL be: https://www.middlebury.edu/institute/admissions/heres-an-example-page

Also, it is important to note that the menu for admissions would automatically appear on the page. Even if we did not touch the MENU SETTING. That is because the menu is assigned to URL path. In this case the Admissions menu appears for any page under “/institute/admissions/“. So when you manually create page URL with admissions in it, we also get the menu.

If you uncheck the box and also do not fill in a URL alias, your URL will NOT be a “friendly” URL, but will instead reference the Drupal node ID of the page.

Example:
https://www.middlebury.edu/institute/node/2384

URL Redirects

When you change the URL of your page, it is always important to consider if traffic will try to still access your old URL, and what will happen. In order to prevent “broken pages” or 404 errors, the system will automatically generate a redirect from your old URL to the new URL.