My site is changing its URL, do I need to make a redirect for every page?
No, you don't! As part of the transition to the new pdx.edu, we are implementing 1:1 URL redirects. You can read more about that in the Redirects for sites changing URLs blog post. There are some instances where you may want to manually create a redirect, mentioned in the blog post. If that's the case, you'll want to use the instructions on this page to create that redirect.
What's the difference between a URL alias and a redirect?
Let's say I have a page on my site: "About Us", and the URL is /../example-site/about-us. However, on my old site, the URL was /../example-site/about-us-0
The /about-us-0 is not a very attractive URL so I don't want to maintain it for the future. As such, I'd want a redirect. That way when a person goes to /../example-site/about-us-0, the URL in the address bar is changed to /../example-site/about-us. The new (more attractive) URL is the only authentic URL for the page.
A URL alias is a way to change the authentic URL for a page (the URL displayed in the user's address bar). Every page comes with a default alias based on the page title, but you can customize that alias using the Managing URLs documentation. It's best practice to have one alias for a page, though you can make multiple redirects.
How to make a redirect
Making a URL redirect is pretty straightforward. It is important to note, though, that you can only make redirects for originating URLs on your own site. You cannot make redirects from other site's pages. You can, however, make a redirect to a different page or site.
To make a redirect:
Login to your site
In the admin menu, navigate to “Configuration → Search and Metadata → URL Redirects” (pdx.edu/site-name/admin/config/search/redirect)
Click "Add redirect"
Complete the form:
Path: This is the old URL. You'll notice it already has your site URL written before the text field; just enter the end of the URL (everything after your site name).
To: This is the new URL (on your site). If it's a page you've previously published, just start typing the page name and you can select it from the list of options. You shouldn't make redirects to pages you haven't published.
Redirect status: It defaults to "301 Moved Permanently". That's generally what you should leave it as, but you can change it if need be. Just be sure you understand what the other options are before selecting a different one.
Save the redirect, then test it to ensure everything works as intended.
Example 1: Internal Site Redirect
Let's say the Maseeh College of Engineering and Computer Science had an About page with the URL (on their old http://pdx.edu site) of pdx.edu/cecs/about-0
With the http://pdx.edu upgrade, that URL will automatically update to pdx.edu/engineering/about-0
However, the new URL for that page is pdx.edu/engineering/about. We don't want to keep the /about-0 alias, since it's not very attractive. So in this case we want to make a redirect. This is how we would complete the form:
Path: about-0
To: (start typing title of new About page, and select it from the dropdown list)
Redirect status: 301 Moved Permanently
Example 2: Cross-Site Redirect
In this case, the University Policy Library used to be located on the Office of the General Counsel site, with the URL of http://pdx.edu/ogc/university-policy-library
That page is now a fully formed site with a URL of http://pdx.edu/policies . However, the old URL is likely bookmarked for people, so we want to make a redirect for it.
The OGC site has a new URL of /general-counsel, so the old URL is automatically transitioning to http://pdx.edu/general-counsel/university-policy-library . Remember: you always make the redirect on the originating site.
So in this case, we'll want to make the redirect on the OGC site (http://pdx.edu/general-counsel ). This is how we would complete it:
Path: university-policy-library
To: /../policies (you can and should use relative links in redirects, when linking to a separate http://pdx.edu site)
Redirect status: 301 Moved Permanently
Redirects for 404 error pages
What is a 404 error?
A 404 error is also known as a "page not found" error. You get this error when the url you're trying to go to doesn't connect to an actual page. This can be fixed using redirects, though.
When not to make a redirect for a 404 error
That's up to you! Sometimes you have URLs for old pages which don't exist anymore, because the content is no longer relevant. In that case, you may choose to leave the 404 error as is, rather than making a redirect.
Making a redirect for a 404 error page
In some cases, you might already know which pages are going to make a 404 error. You might even encounter them yourself. However, that's not always the case.
Luckily, though, there is an admin page in our system that lets you see which URLs site visitors are going to which are giving them 404 errors. To find your 404 error pages:
Login to your site
In the admin menu, navigate to “Configuration → Search and Metadata → URL Redirects → Fix 404 pages” (pdx.edu/site-name/admin/config/search/redirect/404)
This page shows you all the 404 errors being produced on your site. If you click on "Add redirect" to the right of a listed path, it will take you to the "Add redirect" page with the originating URL path already filled in. You just need to fill in the page you want that URL to redirect to, and make sure you're choosing the right status.