howto to use the redirect 301 with a full change in the domain name

What happens if you completely change your domain name from www.old-domain.com to www.new-domain.com?In this case it is important to inform the search engine of the change.The best solution is to redirect the request to the new url with a 301 code. How?
  • Solution 1 (the best) for those of you who have access to the apache configuration file.We must check that tje mod_rewrite module in apache is enabled.In a ubuntu instalation you will find the file old-domain.conf in the directory /etc/apache2/sites-available/In that file add the following lines:RewriteEngine onRewriteRule (.*) http://www.new-domain.com/$1 [R=301,L]This will redirect in a clean way, your users and the search engines to the new domain.
 

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

                                                              
88
88
88
88,dPYba,,adPYba, 8b,dPPYba, 88,dPPYba, 8b,dPPYba,
88P' "88" "8a 88P' `"8a 88P' "8a 88P' "Y8
88 88 88 88 88 88 88 88
88 88 88 88 88 88 88 88
88 88 88 88 88 88 88 88

Enter the code depicted in ASCII art style.