Redirect Generator
Normally If we want to redirect all audience from any wrong page to directly to homepage, we use this well-known code:
<script type="text/javascript">
window.location.replace("https://www.example.com");
</script>
For HTML Website, even for other websites, we log-in to cPanel > Open 404.shtml file > Paste it replacing all previous code, and obviously replacing www.example.com for our homepage address. But actually there are other types of redirect requirements too. These redirect generators will facilitate the implementation of other redirects scenarios.
Page to Page Redirect
Use this type if you want to redirect from one URL to another.
Domain to Domain Redirect
Use this type if you want to redirect all pages from one domain to another.
Directory to Directory Redirect
Use this type if you want to redirect all pages from one directory to another.
Redirect to www
Use this type if you want to redirect all pages of your website to www domain.