I have WordPress installed and running on GAE and have added my own custom domain via Google Apps. This is great but my appspot.com url is still publicly accessible and searchable.
How would I go about blocking this and redirecting to my custom domain?
I imagine it involves adding a url handler in the app.yaml file that points to a php file. I have no idea what would go inside though.
Also, how would I then go about setting up a 301 redirect for website canonisation and SEO that accounts for SSL and cron entries?
Any help is appreciated, thanks!
The
appspot.com
URL is always accessible and there is no way to turn it off. You can’t do much in theapp.yaml
since it’s not aware of the custom domain. I’m not really a PHP guy but you should do is to write manually the redirect based on the host URL if you really want to do that. Since you’re using WordPress you might need to do quite some work if you don’t want to redirect only from the root, but from any page.Personally I think you should just leave it there and do nothing, even Khan Academy is not redirecting (http://khan-academy.appspot.com) and I’m pretty sure that very few are actually doing that.