Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently changed domain name for a webapp I run on Google App Engine and I am wondering if there is a simple way to do a page for page redirect from my old website to the new domain. Everything code wise is staying exactly the same but I just want it to go to the new domain.

I am using Python and the webapp2 framework for the web app.

I know I could go through and for every single handler do:

webapp2.redirect('the specific url', permanent=True)

but I am hoping for a simpler solution.

share|improve this question

You should be able to do this on a global scale using webapp.RequestHandlers

class FormHandler(webapp.RequestHandler):
    def post(self):
        if processFormData(self.request):
            self.redirect("the specific url")

Also this your find more support on stack overflow since this is python based coding.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.