How do I 301 redirect from my netlify.app domain to my custom domain?

Hi

I’ve set up a _redirects file which is working for individual pages on my site, https://rubberring.netlify.app (to clarify, it works on both the custom domain and the Netlify domain).

What I’d like to be able to do is. redirect traffic from the netlify.app version of my website to the custom domain. I’ve set up the following in my _redirects file (underneath the current redirects that are working), but these new redirects are not working. Am I doing something wrong here?

https://rubberring.netlify.app/  https://rubber-ring.co.uk/
http://rubberring.netlify.app/  https://rubber-ring.co.uk/

You need just this one rule:

https://rubberring.netlify.app/* https://rubber-ring.co.uk/:splat 301!

Thank you for sharing, this has worked :grinning: