Redirects

Redirects

Appears in: Performance audits

This guide explains how to redirect content.

Redirect a single page

  1. Open redirects.yaml.

  2. Add an entry similar to the following:

    source: /path/to/old/page
    destination: /path/to/new/page

Redirect multiple pages in a directory

It's possible to redirect a subdirectory of content, but this feature is probably no longer useful because web.dev now uses a flat URL structure.

  1. Open redirects.yaml.

  2. Add an entry similar to the following:

    source: /path/to/old/subdirectory/:part
    destination: /path/to/new/subdirectory/:part
Last updated: Improve article