Skip to content
fhseohub a link building agency
  • Home
  • ServicesExpand
    • Listicle Brand Mentions
    • Guest Posting Service
    • Niche Edit Service
    • White Label Link Building Service
    • Press Release & Digital PR Services
  • Free SEO ToolsExpand
    • Word Counter
    • Keyword Density Checker
    • Text Style Generator: Free Online Tool
  • Blog
  • About
  • Contact
fhseohub a link building agency

YAML Redirect Generator

Output format
Redirect config

FREE TOOL · NO SIGN-UP

This YAML redirect generator turns a list of old and new URLs into ready-to-paste redirect rules for static sites. Add your URL pairs, pick a format (a YAML redirect list, Jekyll redirect_from front matter, a Netlify _redirects file or vercel.json) and copy the result into your project. It’s made for developers and SEOs moving pages on Jekyll, Hugo, Netlify, Vercel or Cloudflare Pages who don’t want to write every rule by hand.

How YAML Redirects Work on Static Sites

Static sites don’t have a traditional server running code on every request, so redirects are handled in one of two places: in each page’s front matter or in a configuration file the host reads.

Front matter vs config files

Front matter is the YAML block at the top of a Markdown or HTML file, between two --- lines. With Jekyll’s jekyll-redirect-from plugin, you list old URLs under redirect_from: on the new page, and the plugin generates a small redirect page at each old address. Hugo has the same idea built in, called aliases.

Config files keep every redirect in one place. Netlify and Cloudflare Pages read a _redirects text file, Vercel reads the redirects array in vercel.json, and some build setups use a YAML list of rules. Central files are easier to review and audit, especially after a large migration.

Server vs client-side redirects

That difference matters for SEO. Host-level files such as _redirects and vercel.json are applied by the hosting platform before the page loads, and they return real HTTP status codes like 301 or 308. Front-matter redirects in Jekyll and Hugo usually create an HTML page with a meta refresh tag and a canonical link. That’s a client-side redirect: it works for visitors and search engines generally follow it, but it isn’t a true 301.

How to Generate YAML Redirects

Step 1 – Paste old and new URLs

Fill in the From and To fields for each redirect. Two rows are ready to start, and + Add redirect adds more. For long lists, use the Bulk pairs box: one pair per line, old path first, then a space, then the new path, like /old-post/ /new-post/. Bulk pairs are always 301 redirects.

Step 2 – Choose platform format

Pick an Output format: YAML list for a neutral redirects: list you can adapt, Netlify _redirects for Netlify and Cloudflare Pages, vercel.json for Vercel, or Jekyll redirect_from for front matter.

Step 3 – Set status

Choose a Status for each row: 301 or 308 for permanent moves, 302 or 307 for temporary ones. In vercel.json output, 301 and 308 become "permanent": true, and 302 and 307 become false.

Step 4 – Copy into config

The output updates as you type. Click Copy or Download, then paste it into the right file: _redirects in your publish folder, vercel.json in the project root, or the front matter of each destination page for Jekyll.

Platform Formats Compared

Jekyll and Hugo

The Jekyll output groups every old URL under the page it now points to, with a comment showing which page’s front matter it belongs in:

redirect_from: followed by - /old-url/ lines.

You’ll need the jekyll-redirect-from plugin enabled. For Hugo, the idea is identical but the key is aliases, so copy the Jekyll output and rename redirect_from to aliases. Both generate meta refresh pages rather than server redirects.

Netlify and Cloudflare Pages

The _redirects output writes one rule per line: source, destination and status code, separated by spaces, such as /old/ /new/ 301. Netlify and Cloudflare Pages both read this file from the root of the published site, and both return real HTTP redirects. Rules are processed from top to bottom, and the first match wins, so put specific rules above broad ones.

SEO Impact of Meta Refresh Redirects

How Google treats them

Google’s documentation says an instant meta refresh is interpreted as a permanent redirect, while a delayed one is treated as temporary. So the zero-delay pages that Jekyll and Hugo generate are usually understood as moved pages. It’s still less direct than a server 301: the old URL returns a 200 status with a small HTML page, and some tools and crawlers handle that less reliably. Learn more on our Meta Refresh Redirect Generator page.

When to use host-level rules

If your host supports a redirects file, use it for anything important, such as moved blog posts, renamed categories or domain changes. Keep front-matter redirects for small cases where you can’t edit host configuration. For sites on traditional servers, the .htaccess Redirect Generator and Nginx Redirect Generator do the same job.

Planning a Static Site Migration

Building a redirect map

Before you move anything, export a full list of current URLs from your sitemap, analytics and Search Console. Map each old URL to the most relevant new page, not just the homepage. A spreadsheet with “from” and “to” columns pastes straight into the Bulk pairs box once you join the columns with a space.

Testing after deploy

After deploying, test a sample of old URLs. Check that each one lands on the right page in a single hop and returns the status code you expect. Then update internal links to point to the new URLs directly, and submit your updated sitemap.

YAML Redirect Mistakes

Tabs and indentation

YAML doesn’t allow tabs for indentation, and nesting depends on consistent spaces. The generator uses spaces, so keep them if you edit by hand.

Unquoted special characters

Characters like :, #, &, ? and * have special meaning in YAML. The generator wraps values containing them in quotes automatically.

Redirect chains

If A redirects to B and B redirects to C, update A to point straight to C. Chains slow visitors down and waste crawl budget.

Move Pages Without Breaking Links

A careful redirect plan keeps visitors, backlinks and rankings attached to the pages you move. Generate your rules with the YAML redirect generator, then cover traditional servers with the .htaccess Redirect Generator, build fallback pages with the Meta Refresh Redirect Generator and update your sitemap with the XML Sitemap Generator. Explore more technical SEO tools in the FHSEO Hub free SEO tools collection.

YAML Redirect Generator FAQs

To add redirects to a static site, use your host’s redirect file when possible, such as `_redirects` on Netlify or Cloudflare Pages, or `vercel.json` on Vercel. These return real HTTP redirects. Alternatively, add `redirect_from` in Jekyll or `aliases` in Hugo front matter, which create meta refresh pages.

Redirects in Jekyll work through the `jekyll-redirect-from` plugin. You add a `redirect_from` list of old URLs to the front matter of the new page, and when the site builds, the plugin creates an HTML page at each old URL with a meta refresh and canonical link pointing to the new page.

Static-site redirects are real 301s only when your hosting platform applies them, for example through Netlify or Cloudflare Pages `_redirects` files or Vercel’s `vercel.json`. Front-matter redirects in Jekyll and Hugo create meta refresh pages that return a 200 status. Google generally treats instant meta refreshes as permanent redirects.

The YAML syntax errors that most often break redirects are tabs used for indentation, inconsistent spacing in nested lists, missing dashes before list items and unquoted values containing colons, hashes or other special characters. A single error can stop the whole file from parsing, so check the build log after deploying.

To bulk-create redirects, paste your URL pairs into the Bulk pairs box, one per line, with the old path and new path separated by a space. The generator turns every line into a 301 rule in the format you choose. Export pairs from a spreadsheet to handle hundreds at once.

Link Building Agency for High-Quality Backlinks & SEO Growth

Guides

  • Guest Posting
  • Link Insertions
  • Press Release
  • Web Designs

Resources

  • Free SEO Tools
  • Link Building Glossary
  • Blog
  • About us
  • Contact

Follow

Facebook Instagram Linkedin Twitter TikTok YouTube
Scroll to top
  • Home
  • Services
    • Listicle Brand Mentions
    • Guest Posting Service
    • Niche Edit Service
    • White Label Link Building Service
    • Press Release & Digital PR Services
  • Free SEO Tools
    • Word Counter
    • Keyword Density Checker
    • Text Style Generator: Free Online Tool
  • Blog
  • About
  • Contact
Search