Overview
When you change the URL for a Page or Post, you are changing its address. For example, say that you publish a Page with the URL https://dornsife.usc.edu/list-of-all-zoom-rooms-in-usc-dornsife, and you later simplify the URL to https://dornsife.usc.edu/zoomrooms. Website visitors who try to use the old URL will view an "Error 404" page and may not be able to easily find the new URL for the Page. To prevent this type of error, you can use redirects.
Follow this guide to set up the Redirection plugin in WordPress. You can use the plugin to:
- Ensure that even after you change a Page's URL, visitors can view the Page with either the old or new URL
- Review existing redirects, and edit, disable, or delete them as needed
- Review which URLs visitors are viewing that result in an "Error 404" page
Setting up the Redirection plugin
Quick guide
- In the left menu, go to Tools > Redirection.
- Click Start Setup.
- Select the following checkboxes and click Continue:
- Monitor permalink changes in WordPress posts and pages
- Keep a log of all redirects and 404 errors
- Select the checkbox(es) to import any existing redirects, and click Continue.
- You may not have any existing redirects if you did not edit any of your existing Post URLs.
- Click Finish Setup.
- Wait about 5–10 seconds for setup to complete, and click Continue.
- Click Continue.
- Click Ready to begin!
Detailed guide (with screenshots)
- In the left menu, go to Tools > Redirection.
- Click Start Setup.
- Select the following checkboxes and click Continue:
- Monitor permalink changes in WordPress posts and pages
-
Keep a log of all redirects and 404 errors
- Select the checkbox(es) to import any existing redirects, and click Continue.
- You may not have any existing redirects if you did not edit any of your existing Post URLs.
- Click Finish Setup.
- Wait about 5–10 seconds for setup to complete, and click Continue.
- Click Continue.
- Click Ready to begin!
Setting up and reviewing redirects
Setting up a redirect
If you are changing the URL for a published Page or Post, we recommend doing by directly editing the Page or Post's permalink:
Quick guide
Method 1: Open the Page or Post in the WordPress editor
- Open the Page or Post in the WordPress editor. In the Settings sidebar (right side), click the link in the URL field.
- Edit the Permalink field and click Update.
Method 2: Use the Quick Edit option
- In the left menu, click Pages or Posts. Hover over the Page's or Post's title and click Quick Edit.
- Edit the Slug field.
- Click Update.
If you need to set up a redirect for a reason other than changing the URL for a Page or Post (for example, you need to redirect from the original links on the old Dornsife website to the redesigned Dornsife website), you can do so manually in the Redirection plugin:
- In the left menu, click Tools > Redirection.
- Click Add New.
- Fill out the fields. You can optionally click the gear icon to fill out advanced settings.
- Click Add Redirect.
Note: If your old pages lived on the main Dornsife website instead of a department minisite, the redirect setup instructions above may not work. Example: if your pages previously lived on dornsife.usc.edu/example-page instead of dornsife.usc.edu/deptname/example-page.
If this is your situation, contact webproject@dornsife.usc.edu with your list of Source URLs and Target URLs (download sample list as .csv file) so we can set up your redirects on the main Dornsife website on your behalf.
Reviewing redirects
You can review and edit all of your minisite's redirects in Redirection:
- In the left menu, click Tools > Redirection.
- Your minisite's redirects display in a table format. Hover over a URL to access the following options:
- Edit (note that you can click the Gear icon for advanced settings)
- Disable
- Delete
- Check Redirect
Viewing logs
Accessing logs
- In the left menu, click Tools > Redirection.
- Select a log:
- To review the redirect log, click Log.
- To review the 404 log, click 404s.
Using 404 logs with redirects
404 logs are particularly useful because you can see the URLs where visitors are expecting to find content. Sometimes visitors are simply mistyping a URL, but if you see certain URLs appearing multiple times, make sure that you haven't been giving visitors the wrong URL.
If the URL appears frequently or you can't track down the original source of the wrong URL, you can set up a redirect to the correct URL:
Quick guide
- Click Redirects. Then click Add New.
- In Source URL, type or paste the wrong URL that is showing up in the 404 log. In Target URL, type or paste the correct URL or the one you want to redirect visitors to.
- Make sure that for both of these fields, you are using the relative URL (e.g. don't use dornsife.usc.edu/departmentname/page but rather /departmentname/page).
- Click Add Redirect.
- The redirect is added to the top of the redirect table and you can click the URL to check it.
Detailed guide (with screenshots)
- Click Redirects. Then click Add New.
- In Source URL, type or paste the wrong URL that is showing up in the 404 log. In Target URL, type or paste the correct URL or the one you want to redirect visitors to.
- Make sure that for both of these fields, you are using the relative URL (e.g. don't use dornsife.usc.edu/departmentname/page but rather /departmentname/page).
- Click Add Redirect.
- The redirect is added to the top of the redirect table and you can click the URL to check it.
Changing the retention period for logs
By default, the redirect and 404 logs are retained for one week. You can change this setting, although we do not recommend retaining the logs for longer than one month.
Quick guide
- Click Options.
- Locate the labels "Redirect Logs" and "404 Logs." Click the dropdowns to select another option. For site performance, we recommend going no further than A month.
- Scroll to the bottom and click Update.
Detailed guide (with screenshots)
- Click Options.
- Locate the labels "Redirect Logs" and "404 Logs." Click the dropdowns to select another option. For site performance, we recommend going no further than A month.
- Scroll to the bottom and click Update.