slug migration 301 redirects
Generate disk-verified 301 redirect maps for Nginx to fix 404 errors after URL structure changes.
Free
Works with the AI Agents you already use
About this skill
Changing a URL structure or fixing a slug-generation rule often leads to a massive spike in 404 errors. These broken links destroy SEO authority and waste crawl budget as Google spends months retrying dead pages. This skill automates the generation of verified 301 redirect tables specifically for Nginx environments.
What it does
- Slug reconstruction identifies the transformation logic required to map old URLs to their new equivalents.
- Disk-level verification ensures a redirect is only created if the old path is missing and the target path exists.
- Nginx map generation produces structured map files that handle thousands of redirects without bloating server configurations.
- Config auditing checks for common Nginx pitfalls like
map_hash_bucket_sizelimits and symlink mismatches. - Safety validation provides a workflow for testing configuration syntax and verifying redirect headers before production deployment.
How it works
- Configure the generator by defining the site root and the specific slug transformation rule in the Python script.
- Execute the verification script to scan the filesystem and identify valid redirect pairs.
- Deploy the Nginx map to the server, ensuring the
map_hashdirectives are present to handle large datasets. - Test and reload using
nginx -tto confirm syntax before applying the changes to live traffic.
Frameworks & tools
This skill utilizes Python for filesystem scanning and URL mapping. It is designed for Nginx web servers using map blocks for efficient redirect handling.
Why this beats prompting it yourself
Generic AI prompts often suggest regex rules that cause collateral damage to valid URLs. This skill enforces a "verify on disk" requirement, ensuring every single redirect leads to a live page and never creates a redirect loop or a broken target.
Use cases
- Migrating a blog structure from
/post/slugto/articles/slug. - Removing redundant category suffixes from thousands of indexed product URLs.
- Cleaning up Search Console 404 errors after a site-wide redesign.
- Preserving SEO link equity when changing URL naming conventions in a CMS.
Known limitations
This skill requires the site to be served from a static filesystem for verification. It is not suitable for dynamically generated URLs that do not exist as files on disk.
Requires access to the server filesystem to verify paths. Only supports Nginx map-based redirects. Not for dynamic sites without a disk-backed URL structure.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 29 days ago
- Free with an Agensi account