Drupal: Changing Page Titles and URLs

Summary

Changing the title of a page in Drupal will change the URL and can cause broken links to your web page, so you should be aware of how these elements interact.

 

Details

In Drupal, four page elements are tied together:

  • Title
  • Page URL
  • Menu Listing
  • Browser Title

 

Setting the Page Title

When you set the title of a page:

Drupal page title snippet

that title also automatically becomes:

  1. The URL of the page:Drupal example URL
  2. The menu listing both in the top and side menus (if the page is included in a menu):
    Drupal example menu Drupal menu example
  3. The title in the tab of the browser:
    Drupal browser tab example

 

Changing the Page Title

If you change the page title, Drupal will automatically change the URL, as well as the browser title.

  • In some cases, you will want both the title and the URL to change. For example, if a department name changes, you will want the URL to reflect this change.
  • In other cases, you will not need the URL to change, for example, if you change the title from Contact to Contact Us.

Items to consider before changing the page title:

  • If the URL changes and you are not using the college build, links to the page may break. These links may be on your own site, on other unh.edu websites or on external sites.
  • Your page rankings in search engines such as Google can be affected by these redirects and broken links.
  • Although your page title has changed, your menu listing will remain the same and can cause confusion if not addressed.

 

How to change a page title without changing the URL

College sites (and sites using the College build)

Step 1 - Edit the page.

Step 2 - On the right side of the page, click on URL path options. An accordion will display with a checked box for Generate automatic URL alias:

Drupal URL config example

 

Step 3 - Uncheck the box. The alias will become active:

Drupal URL config example

 

Step 4 - Now change the title in the Title field at the top of the page and save the page.

Step 5 - To change the menu listing, while in Edit mode click on Menu options on the right side of the page:

Drupal menu config example

 

Step 6 - Type the new menu listing in the Menu link title This will change the menu listing to match the new title.

 

Other Sites

Step 1 - Edit the page.

Step 2 - At the bottom of the page, click on URL path settings. A box will display with a checked box for Generate automatic URL alias:

Drupal URL config example


Step 3 -​​​​​ ​​Uncheck the box. The alias will become active:

Drupal URL config example


Step 4 - Then change the title in the Title field at the top of the page and save the page. The title will change, leaving the alias the same.

Step 5 - If you want to change the menu listing, at the bottom of the page click on Menu settings:

Drupal menu config example

Step 6 - Type the new menu listing in the Menu link title This will change the menu listing to match the new title.

 

Want to learn more?

Additional help on this and other related topics is available during a regularly scheduled Drupal/myPages/Website Tools - Walk-in/Zoom-in Session. More information, including a complete schedule, is available at Drupal/Sites@USNH/Website Tools - Virtual Walk-in Session.

 

Need additional help?

If you have any additional questions, please fill out the Website, Mobile, & SharePoint Development & Design Support Form.

Details

Article ID: 1881
Created
Fri 7/19/19 6:25 PM
Modified
Tue 3/26/24 10:17 AM
Applicable Institution(s):
Plymouth State University (PSU)
University of New Hampshire (UNH)
USNH System Office