Forums

Best practises for moving web app from domain-a.io to domain-b.io

Hello,

I have a Flask app hosted as a WebApp on eu.PythonAnywhere, currently running on domain-a.io. I need to move it to a new domain: domain-b.io.

I read this forum thread, where you recommend creating a new web app and implementing redirects (PythonAnywhere redirect docs).

However, according to Google’s documentation, they recommend using server-side permanent redirects (see reference below).

Could you please advise on how I can implement server-side permanent redirects for my web app on PythonAnywhere?

This is very important for us as we spent years building the SEO of our business and we would like to follow Google's recommendations to maximise the chance of preserving our SEO.

Thanks in advance for your help.

From Google doc: "We recommend server side permanent redirects from the old URLs to the new URLs as you indicated in your mapping. Check with your server administrator (or hosting company) about what kind of server side redirects you can technically do. It might be redirect rules in your .htaccess files if your server is using Apache HTTP server or redirect functions in your CMS.

On PythonAnywhere, you can’t configure .htaccess or the underlying web server directly, but the redirect mechanism we provide does exactly what Google is asking for: it issues a proper 301 Moved Permanently response from the old domain to the new one. Search engines treat this the same as if you’d set it up in Apache or Nginx.

So the steps are:

  • Create the new web app on domain-b.io.
  • Set the old app on domain-a.io to redirect permanently to the new one (as per our redirect docs).

That way, visitors and Googlebot will both see the correct permanent redirect, and your SEO should transfer correctly.