301 redirects
Redirect old URLs to new ones with permanent 301 rules, including regex patterns with captured groups.
A site keeps a list of redirect rules, each with a source and a destination. On every visitor request the path is matched against the rules in order and the first match sends a 301 redirect. Sources are regular expressions matched against the whole path, so one rule can move a whole folder (for example /blog/(.*) to /articles/$1). Destinations are a path on the site or an https URL. Rules are managed on the Divhunt dashboard or through MCP.
How it works
- Matching: ~^<source>$~ against '/' + request path; first match wins; HTTP 301 with Location.
- Not applied to logged-in admins (role must be visitor) or to Studio screens.
- Write-time validation: source max 200 characters, no ~, no back-references or lookarounds, no nested quantifiers, max 4 open-ended repeats, max 6 capture groups, must compile and pass a catastrophic-backtracking probe; destination max 2,000 characters, no spaces/control characters/backslashes, a path starting with one '/' or an https:// URL; $N references must exist in the source.
- Admin mode allows external https hosts; MCP mode allows only the site's own hosts or an allowlist.
- Runtime safety: low backtrack limit, at most 1,000 rules checked and a 50 ms budget per request; broken rules are skipped and logged.
- Max 1,000 rules per site.
When to use it
- Keep old URLs working after a migration from another builder
- Move a whole blog folder with one regex rule
Limitations
- Only 301 (no 302 or 410)
- Admins are not redirected while logged in, so test in a private window
- Rule editing is on the dashboard site, not inside the builder
Availability
- Works in Designer and MCP.
- Included in every plan.
- Limits: 1,000 rules per site; source 200 characters; destination 2,000 characters; 6 capture groups
How to use it.
- In the builder menu, open Redirects (opens the Divhunt dashboard)
- Add a source path or pattern and a destination
- Save, then test the old URL in a private window
Questions.
Can I use wildcards?
How many rules can I have?
Related features.
Browse other features
Designer
Bring your ideas to life with our visual website builder. Drag and drop with ease, or dive into coding when needed.
→AI Studio
Describe it and AI builds it. Every change lands in the same project you can open in the Designer.
→MCP
Connect Claude Code, Cursor or any MCP client and build whole sites with your own agent.
→CMS
Create, organize, and manage your dynamic content with the maximum freedom and flexibility of our visual CMS.
→SEO
Divhunt delivers ultra-fast & structured sites that are good for ranking by default, while offering complete control for customization.
→REST API
Easily link to any REST API endpoint with instant preview and expand your site’s functionality smoother than ever before.
→Plugins
Divhunt offers an open platform for creating plugins to upgrade features, add new capabilities, and simplify building better sites.
→Localization
Localize everything from static pages and CMS content to URLs and metadata, in up to 15 languages with no add-on.
→Interactions
Visually create animations and interactions with a simple, intuitive timeline. Build smooth, engaging experiences without code.
→Custom Files
Manage JS and CSS files with a structure developers love, combining folders and clean organization.
→Memberships
Create plans, decide who sees what and connect it all to your CMS. Build courses, communities or client portals.
→