first, I apologize for any spelling error. I am french.
I'd like your help for something that may have a simple fix, but I have not found anything specific to my case.
EXPLANATION
I have a site on Blogger platform and a domain registered at Godaddy for about two years. But nowadays, I'm unhappy there because of the many limitations of this platform. I have about 300 posts published and indexed in this blog.
Well, I've just create myself a static website (with many HTML files and some CSS/JS) and bought a Linux Hosting (Deluxe with cPanel) on Godaddy also. I created a subdomain in the parent domain (which is pointed at the Blogger) to test this new static site. Everything's working fine and ready to go...
THE PROBLEM
As I said, I have 300 posts already indexed. I created new HTML files for all these Blogger posts, the way I want, with friendly URL and other customizations. Why? Blogger show my links like this: "mywebsite.com/2010/06/post-name.html." My intention for this new site is to do something like "mywebsite.com/post-name.html". I've set up the paths and everything more in the subdomain.
My question is: How do I redirect the traffic from the old site (Blogger) to the new without losing Google Rank and "bypass" a 404 Not Found error when old links were visited?
I've done several searches on Google and only found tutorials that show how to do this in the migration Blogger to Wordpress.
I know I can't just delete this site on Blogger and (perhaps) something can be done in .htaccess file to solve it. I have to "close" Blogger for now and redirect visitors with a 301 Redirect to the new host to prevent Google punish me for duplicate content, right?
Googling, I found this code:
<b:if cond='data:blog.url == "http://example.com/2013/01/post-name.html"'>
<meta content='0;url=http://example/post-name.html' http-equiv='refresh'/>
</b:if>
But it was a Blogger-to-Wordpress tutorial.
The code above could be applied in my case? Or should I just create a redirect post by post within the .htaccess?
I appreciate any suggestion and help.
example.com
, that right now points to your blog on blogger – and in the future, it will point to your own server, correct? So search engines, as well as all other clients, will still use the same domain to request the content from in the future – only that content will not come from blogger any more, but from your own server. So they won’t even know that your content was on blogger before – so why keep that content? – Elodiaelodieredirect
line you have shown should work, however keep in mind that this treats theURL-path
argument as a prefix only, so if you had old URLs such as/2015/06/oldurl.html
and/2015/06/oldurl.html/foo/bar
, it would redirect both to the new URL (unlikely case however). – Elodiaelodieredirect
statements as well. In that case, using aRewriteRule
could be preferable (if the old and new URLs follow a pattern that can be expressed via regular expressions), or to use a script for it that has a look-up table of some sorts. But for a start, withRedirect
you should be able to achieve what you want. – ElodiaelodieRewriteRule
that matches this pattern as well. This way, you would not need to create a separate redirect for each individual URL. – Elodiaelodie