Back to course

P1 Running a Public Website Day to Day

0% done: 0 of 8 lessons

Lesson 7 of 8 · Simulation

Links and redirects

Progress is saved on this device only. Keep it across devices with a free LFW account.

Curriculum0 of 8 done

Simulation

Redirect the missing addresses and fix a broken link

A working copy of the real screen. Use it as you would the real one. Nothing you type leaves this page.

This exercise runs in your browser and needs JavaScript. The lesson text above covers the same steps.

Not done yet.

When a page moves or is renamed, send its old address to the new one, so printed flyers, bookmarks and search results keep working.

Notes

Step 1 of 8

Start here

Every page address on your site has been printed, bookmarked, emailed, linked from another site or saved in a search engine. When a page moves and nothing points the old address to the new one, all of those links end at an error page. Residents conclude the information is gone.

This lesson covers redirects, short addresses and broken links.

Step 2 of 8

What a redirect does

A redirect is a rule on your website: "anyone who asks for this old address gets sent to this new one." The visitor barely notices. Without it, they see "Page not found."

There are several kinds. The two that matter:

  • 301, permanent: the page has moved for good. Search engines move their listing to the new address. Use this almost always.
  • 302, temporary: the page will come back to the old address. Use this rarely, for example during a short closure.

Most website platforms have a redirect tool built in or available as a plugin. Your web provider can tell you where yours is.

Step 3 of 8

When to add one

Add a redirect every time you:

  • rename a page in a way that changes its address,
  • move a page to a different section,
  • merge two pages into one,
  • replace an old document with a web page,
  • remove a page that has a better replacement.

Point the redirect at the most useful page, not the homepage. If the old pool hours page is gone, send it to the current pool page.

Step 4 of 8

When a page is removed with no replacement

Some content ends: a program closes, a one-time event is over. Leave a short page at the old address that says what happened and where to go instead: "The 2025 recycling pilot has ended. Read about curbside recycling." That beats a dead end.

Step 5 of 8

Short addresses for print

Short addresses, such as yourtown.gov/vote or yourtown.gov/leaves, are easy to say on the radio and print on a flyer. They are redirects too. Keep a list of every one:

  • the short address,
  • where it points,
  • where it was printed or announced,
  • who asked for it,
  • the date it can be retired, if ever.

A short address on a mailer should work as long as that mailer might be on someone's refrigerator. Check the list before every website change, and especially before a redesign.

Step 6 of 8

Before a redesign or a move to a new platform

A new website usually changes many addresses at once. Before launch, export a list of every current address, including documents, and map each one to its new address. Ask your vendor to load the redirects before launch and test them after. Without that map, a new site can break years of links overnight.

Step 7 of 8

Finding broken links

Links to outside sites break when those sites change. Links inside your own site break when someone forgets a redirect. Find them on a schedule:

  • Run a link checker once a month. Many are free, and some website platforms include one.
  • Check your site's "page not found" report if your analytics or hosting shows one. The most-requested missing addresses are the first redirects to add.
  • Fix links to outside sites by updating them, or removing them if the content is gone.

Step 8 of 8

Link text still matters

When you update a link, check its text. "Click here" and "more information" do not say where the link goes, which WCAG 2.1 Success Criterion 2.4.4 addresses. Accessible Content Basics covers link text in its second lesson.

Sources

Task

Your task at your institution

Quiz

4 questions. Choose one answer for each, then check them. Each answer shows its reason.

1. You rename a page from /parks/pool to /parks/swimming. What else do you do?
2. Which kind of redirect tells search engines the move is permanent?
3. A short address like yourtown.gov/vote is printed on a mailer. Who should know it exists?
4. How do you find broken links on your site?
Show the answers
  1. B. Set a permanent redirect from the old address to the new one. Flyers, bookmarks, other sites and search engines still use the old address. A redirect sends them to the new page.
  2. A. 301. A 301 is a permanent redirect. 404 means not found, and 500 is a server error.
  3. B. Whoever manages redirects, written in a list. Printed addresses must keep working for years. A list of them is the only way to protect them during changes.
  4. B. Run a link checker monthly and fix what it finds. Links break when other sites change. A link checker finds them on a schedule.