Create Clean URLs for via Eleventy and Netlify Redirects

Suppose you have a Figma file that serves as your online portfolio. It looks something like this:

Gross. No one wants to open that.

No matter, because you are a web master and happen to run your own website on Eleventy and host it on Netlify. You can use redirects to share a portfolio URL like that then redirects to the Figma link.

Here’s now.

Create a file called _redirects in the src of your Eleventy project. You read that right: without a file extension. Then fill that file with redirects in the following syntax:

/old-url                /new-url
/old-blog/some-post     /new-blog/some-post

For your Figma use-case that might look like:


That’s it. Now we just need to turn it on.

Eleventy ignores files and folders by default. You need to tell it to pass through the _redirects file by leaving instructions in the .eleventy.js file like so:


Here are some more thorough resources that helped me: