Michael
Michael

Reputation: 22957

Google cloud platform - Set up a 301 redirect from www

When I was on AWS, setting up a 301 redirect for my website from www.example.com --> example.com involved simply creating a S3 bucket as a static website and set it up to redirect all traffic to example.com.

I don't see this option on Google cloud storage and I can't think of any way to do this with the HTTP load balancer.

Is the only way doing it involves patching my backend to notice addresses that start with www and strip the www and redirect ?

Upvotes: 0

Views: 1450

Answers (1)

Amir Rahwane
Amir Rahwane

Reputation: 674

Google has a way of using buckets as backends for the http load balancer. It is still in alpha but you can read about it and ask them to try it here. Use it with a html file to redirect like suggested here and my guess it should work.

Alternatively, I use Cloudflares free service, which allows for 3 free redirects. Saving you the trouble of configuring redirects in your backend. This can be done with some other CDN services as well I don't know which.

Upvotes: 1

Related Questions