It’s a standard question that pops up. You own several domains and host duplicate copies of an equivalent site (or simply point all of them to at least one site). Your business strategy changes then does the necessity to vary to a replacement domain. you purchase out your competitor’s site but just want to point it to your own. There are many reasons WHY you'd want to redirect a website , but ensuring proper redirects are in situ are often the difference between advancing your site within the SERPs to throwing in the towel of the SERPs altogether. for extra reading, see our post on resolving canonical issues with 301 Redirects also (www vs non-www pages).
Consider the worth of the domain(s) you're redirecting. reach the domain registration to preserve your backlinks also on protect against someone buying it up later. it'll also preserve any browser bookmarks that are out there to the old domain. This initiative isn't a requirement for 301 redirecting a website.
A) An .HTACCESS file:
301 Redirect an entire website domain:
Redirect 301 / http://your-domain-name.com/
301 Redirect an entire website domain to a single page:
RewriteRule ^.*$ http://www.your-domain-name.com/index.html [L,R=301]
301 Redirect a page to a sub-folder:
Redirect /index.html http://your-domain-name.com/newdirectory/
301 Redirect a page to a new website page:
Redirect /oldfile.html http://your-domain-name.com/newfile.html
B) Or within Windows IIS (will need to work with website administrator)
Again, if the domain isn't a particular match to the new destination website, an entire site 301 redirect won't work. during this case, 301 redirects should be used page by page (section by section). Pages that relate are often redirected to their proper counterparts. Any pages that haven't any homes can simply be redirected to the homepage.
When all website 301 redirects are in situ , check your work: