Manage Website Redirects
site_redirectsManages REAL 301 redirects for the hosting website — the correct way to move an old URL to a
new one after a redesign or a URL change, so link equity and rankings carry over. These are
server-level redirects issued at the edge (HTTP 301 + Location), NOT a <meta refresh> or a
JavaScript hop: search engines treat them as permanent moves, users never see the old page.
mode='list' shows the current rules; 'add' appends; 'remove' deletes the given source paths;
'replace' overwrites the whole list. rules is one rule per line, source then target:
/eski-sayfa /yeni-sayfa
/urunler/eski.html /urunler/yeni
/kampanya https://baska-alan.com/kampanya
Source must start with '/', target with '/' or 'http(s)://'. Matching is an exact path (query
strings ignored): wildcard or query sources like /dir/* are rejected as invalid, not stored;
both the with- and without-trailing-slash forms are handled automatically. Bulk lists are fine
(thousands of rules). confirm=false previews the change, confirm=true applies it — live in
seconds. For 'remove' only the source paths are read from rules, one per line.
CANONICAL HOST: canonical='www' makes the apex redirect to www instead of the other way round; canonical='apex' restores the default. Until now the platform always sent www to the apex, which costs a site whose ad landing URLs, GA4/GTM and pixel history all live on www an extra hop and a host change in its own measurement (issue #298). confirm=false previews the switch. This is a per-site setting and does not touch the redirect rules above.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | list | |
| site | No | ||
| rules | No | ||
| server | No | ||
| confirm | No | ||
| canonical | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||