Imagine you need to migrate your old website to the new domain name. For example, your old blog was located at blog.example.com, but now it needs to be under your main domain name: example.com/blog
In order to save your hard earned position in search, you have to set up correct redirects from old website to the new one:
But how would you set up this quickly and painlessly?
Obvious and correct solution would be set up those redirecrts directly on the new web server.
But what if you don’t have access to the new server configuration or don’t want to fiddle with the settings on it?
You can of course, use numerous online solutions, paid or free, that offer this type of functionality, but free services can dissaper anytime and paid will just burn a hole in your pocket.
As you probably know, Amazon not only the world’s largest retailer, but they also provide web services. We can take advantage of S3’s static website functionality.
It allows you to host static website for almost for free (typically, it will cost around $1/month).
You may notice that there’s special field, called Redirection rules and this is what we are looking for!
The field syntax looks complex on the first glance, but is pretty trivial:
It’s pretty basic XML syntax, and you can add as many RoutingRule’s as you wish:
Now, when everything is set up, last step is to point your domain to your new static website. Easiest way is when your bucket name is the same as your domain name.