Bulk URL find and replace
Domain change, HTTP to HTTPS, a path prefix that moved — all one substitution across a few thousand URLs. Doing it in a text editor works until the string you are replacing also appears in a query parameter. Scope the change to the host, or the path, or the query, and the rest of every URL is untouchable.
Preview
How to use
- Paste the URL list.
- Fill in Find and Replace with. The preview updates as you type, so you see the effect before committing to it.
- Set Apply to. This is the part that makes bulk rewriting safe — replacing a domain name in Host only cannot touch a
?ref=parameter that happens to contain the same string. - Turn on regular expression for anything structural — capture groups work in the replacement as
$1,$2. - Check the Preview table: changed rows are marked, unchanged rows are dimmed, and the status line counts how many were affected. If that count is not what you expected, the pattern is wrong.
Patterns worth knowing
| Goal | Scope | Find | Replace |
|---|---|---|---|
| Change domain | Host only | old.example.com | new.example.com |
| Force HTTPS | Scheme only | http | https |
| Move a path prefix | Path only | ^/blog/ (regex) | /articles/ |
| Drop a path prefix | Path only | ^/en/ (regex) | / |
| Add a trailing slash | Path only | ([^/])$ (regex) | $1/ |
| Strip a file extension | Path only | \.html?$ (regex) | (empty) |
| Swap a subdomain for a path | The whole URL | ://shop\.(.+?)/ (regex) | ://$1/shop/ |
| Rename a query parameter | Query only | \bpid= (regex) | product_id= |
One caution on the regex mode: when the Apply to scope is a single component, anchors mean what you would hope — ^ is the start of the path, not of the URL. In whole URL scope, ^ is the scheme, which is almost never where you want to anchor a path rule. If a pattern is matching nothing, that mismatch is usually why.
FAQ
Why is a URL unchanged when the string is clearly in it?
Almost always a scope mismatch — the string is in the query but the scope is Path only, or vice versa. Switch to The whole URL to confirm the pattern matches at all, then narrow the scope again.
Do component scopes re-encode the URL?
Yes — scoped replacements go through the browser's URL parser, so the output is normalized: the host is lowercased, a default port is dropped, and illegal characters in your replacement are percent-encoded. Use The whole URL scope for byte-exact string surgery.
Can I use capture groups?
Yes, with regular expression on. $1 through $9 and $& for the whole match all work, as in JavaScript's String.replace.
What if I need different replacements per URL?
That is a mapping, not a substitution — put the old and new pairs into the redirect map generator, which takes two columns and emits server config.