Redirects and canonicals Optional
Say who made each redirect
Name the system that made each redirect in a Redirect-By header, so you can trace redirects.
How to do it
Add Redirect-By: <system> to every redirect the app and the front server make. This is a convention, not a standard. WordPress sends X-Redirect-By.
Example
location = /old-pricing {
add_header Redirect-By nginx always;
return 301 https://example.com/pricing;
}
curl -sI https://example.com/old-pricing | grep -i redirect-by
# Redirect-By: nginx
How to check
curl -sI on a redirect shows the header.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/redirects-and-canonicals/redirect-by.