Home
Support Forums

Redirect whole website including the Homepage

Hey I would like to redirect the whole website to another website URL.

I did created a redirects file and apart from homepage…everything is working fine.

Here is my code in the redirect file.

/* https://donateers.org/htmlsitemap/ 301

is there a way to make homepage also redirect to the destination URL?

Thank you in advance

Hi @sureshkumarg

If you want to direct everything, including pages that exist already, you need to add a ! to the end of the status code ie.

/*    https://donateers.org/htmlsitemap/    301!

Note: make sure this is going to another domain, as the above rule will cause an infinite redirect if used to redirect to the same site.

2 Likes

Thank you Coelmay.

It works. Wish it was mentioned it in the documentation too.

Appreciate the quick help even on weekends too.

Hey there, @sureshkumarg :wave:

Thanks for that feedback! I have shared your thoughts with our Documentation team so that they can look into this. Glad everything is working for you now :netliconfetti: