How to do 301 at domain level
Content is king
The website structure..
301 Redirect — Keep SEO Rankings..
How to do 301 at domain level..
The best and recommended way is to handle it using htaccess. I won’t recommend doing it using PHP. Why htaccess, it can be separate post for that (for now please google it and you will easily find the answer).
Below is the sample code that we used , it should be added to old website where you want to add the redirection. In our case we added this to translumina.in —
# BEGIN 301 redirect to domain.com to domain.com/in
RedirectMatch 301 ^/(.*)$ https://domain.com/in/$1
# END 301 redirect
Basically this redirects all traffic on translumin.in and its subpages to translumina.com.
Hope this helps someone looking for right and easy way to handle domain wide redirections.
Entrepreneur and Technology Enthusiast | Started Varshyl Technologies, a web and mobile application development company, helping companies build and promote their digital presence. Co-founded Snapworks – a mobile first communication platform for schools. Outside VT, enjoys his morning workouts, reading biographies and golf.