Changing Page URLs
When you create a new page, WordPress automatically generates the page URL (also called the permalink) based on the page title.
For example:
- Page Title: Residency Curriculum Overview
- URL: https://www.med.unc.edu/your-site/residency/residency-curriculum-overview/
WordPress converts the title into a URL-friendly format:
- All lowercase
- Spaces replaced with hyphens
- Special characters removed
When Should You Edit a URL?
Edit the URL when:
- Renaming pages
- The auto-generated version creates unnecessary wording
- The page title is very long
- You need a URL that is easier to share or promote
Example:
The Department of Health Sciences has a page titled “The Alliance of Health Science Ambassadors”, located under the Students section. The default URL based on the title would be: https://www.med.unc.edu/healthsciences/students/the-alliance-of-heath-science-ambassadors. This URL is long, hard to type, and not ideal for sharing with students.
If the department wants to promote the program and make the link more user-friendly, a shorter URL such as: https://www.med.unc.edu/healthsciences/students/ambassadors, is clearer, easier to remember
Changing URLs Will Break Links
Changing the URL of a page will break any existing links that point to that page. This affects both internal and external links. For that reason, it’s best to modify the URL when the page is first created. Once a page is published and in use, changing its URL should be done with caution.
- WordPress does not automatically redirect old URLs to the new one. Anyone using the old link will receive a “Page Not Found” error.
- Update any internal links on your site that point to the old URL. This includes menus, buttons, calls to action, and links embedded in other pages.
- External links will also break. If important partners or departments link to your page, notify them so they can update their links.
- Search engines will eventually adjust. The new URL will be indexed over time, but until then, the old URL may appear in search results.
- Siteimprove can be used to find broken links. After updating a URL, run a new site scan so Siteimprove can locate any internal links that now need updating.
How to Edit the URL
- Creating a New Page or edit an existing one.
- Select Edit next to the permalink field that is located below the page title.
- Adjust the URL text as needed.
- Keep URLs short and descriptive.
- Good: faculty-resources
- Avoid: all-available-faculty-resources-and-guidelines-2025
- Use lowercase letters only.
- Use hyphens to separate words, never underscores.
- Keep URLs short and descriptive.
- Click OK, then Update the page to save changes.
Why WordPress Sometimes Adds “-2” to a URL
If you see a URL end in “-2”, it means WordPress has detected that the same URL already exists somewhere on your site.
WordPress requires every page, post, event, and media file to have a unique URL. So if you create a new page titled “Research” and a page, post, or even a media file already uses that URL, WordPress will automatically generate a new one:
- Existing URL: /research/
- New Page URL: /research-2/
This can happen when:
- Another page is already using the same title
- A previous page was deleted but still exists in the Trash
- A media file (PDF, image, document) has the same name and generated the same URL
If you run into this:
- Check the All Pages list for another page with the same name.
- Check the Trash – URLs are still reserved for items in Trash.
- Check the Media Library for files with the same name.
- Adjust your new page’s URL to something clearer and more specific if needed.