Drupal: Changing Page Titles and URLs

Body

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, that title also automatically becomes the URL of the page, the menu listing both in the top and side menus (if the page is included in a menu), and the title in the tab of the browser.

Drupal page title snippet

 

The URL of the page is shown below:

Drupal example URL

 

The top and side menus show the same title of the page:

View of top menu     View of side menu

 

The name 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

Task: change a page title without changing the URL

College sites (and sites using the College build)

Instructions

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.

 

Outcome

You will be able to change the titles of a page.

 

Task: Editing other sites

Instructions

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.

 

Outcome

You will be able to change the title of other sites.

 

Need additional help?

Guidance on this and other related topics is available during a weekly Drupal/Sites@USNH/Website Tools - Virtual Walk-in Session.

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

 

Details

Details

Article ID: 1881
Created
Fri 7/19/19 6:25 PM
Modified
Thu 10/2/25 9:36 AM
Applicable Institution(s):
Plymouth State University (PSU)
University of New Hampshire (UNH)
USNH System Office