How to create a 301 Redirect
* Search Engine Friendly Method
* Change Page URLs with 301 redirects
* Permanently moved to a new location
* Can remove canonical issues(redirects to only www.domain.com) – webmaster can also be used to solve it
* Google understand these (www.abc.com and abc.com) as a different URL.
* Google recommends using a 301 redirect to change the URL of a page as it is shown in search engine results
www.gsesoftsolutions.com
A Tech Blog
Twitter: @GSESoftSolution
My Facebook Page@gsesoftsolutions
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
How to create a 301 redirect
1. How to create a 301 Redirect
www.gsesoftsolutions.com
A Tech Blog
Twitter: @GSESoftSolution
My Facebook Page
@gsesoftsolutions
2. 301 Redirect
• Search Engine Friendly Method
• Change Page URLs with 301 redirects
• Permanently moved to a new location
• Can remove canonical issues(redirects to only
www.domain.com) – webmaster can also be used to
solve it
• Google understand these (www.abc.com and abc.com)
as a different URL.
• Google recommends using a 301 redirect to change the
URL of a page as it is shown in search engine results
3. Client Request
• GET /index.php HTTP/1.1 Host:
www.example.org
• HTTP/1.1 301 Moved Permanently Location:
http://www.example.org/index.asp
Server Response
4. Redirect to www using htaccess
redirect
• RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1
[r=301,nc]
5. Redirect Old Domain to New Domain
using 301 Redirect
• RewriteEngine on
RewriteRule (.*)
http://www.newdomain.com/$1 [R=301,L]
6. Ruby on Rails Redirect
• def old_action
headers["Status"] = "301 Moved Permanently"
redirect_to "http://www.new-domain.com/"
end
12. IIS Redirect
• Start > Program > Administrative Tool > Go to
Internet Service Manager
• Right click on the file or folder which you need
to redirect
• Select a title named ‘redirection to a url’
• Enter the name of the page
• Check the both the checkbox ‘A permanent
redirection for this resource’ and ’exact url
entered above’ and click on apply