How to redirect root?

I have a website:
I recently bought the domain to use as a link shortener of sorts.
My intention is that, if is opened, it should redirect to

The _redirects file looks like this:


Everything works fine, but if you try opening fails to take you to
What could be the issue and how do I fix it?

Netlify site:

Hey @pexeixv

Do you have an index.html file deployed with If so you will need to force the redirect.


/    301!

If deploying as a shortener with everything redirecting (including the domain root), you can deploy without an index.html.

Hey @coelmay
I did try deploying without index.html, but it gets stuck on uploading. That’s why I had to create an empty index file.

I was able to fix it with the line above.
However, I still have to upload an empty index.html so that it’s not stuck on uploading.

Appears something has changed since I last tested this and the index.html is required.

Do not also you only need the one rule

/*   301!

as this covers the domain root as well.

The rule

/  301!

is redundant.

1 Like