- Including the redirect target in the XML sitemap.
- Update internal links to point to the redirect target.
- Update any canonincal URLs to point to the redirect target.
The recommended function to redirect is
This code would send a visitor to
https://www.contentkingapp.com/ upon page load.
The benefit of using the
window.location.href would. That could cause a visitor to get stuck in back-button loops. Therefore, don’t use it when redirecting visitors immediately to another URL.