Beside email forwarding, hanami offers a userful service for URL redirection so you can redirect your domain/url to another website without the need to maintain your own server.
The process requires create 2 DNS records
This CNAME records will point your domain to our server so we can serve traffic and do URL redirection.
simply add a cname record with these values
hostname: @ or blank on your provider
Example, in this screen I used CloudFlare to define CNAME record
This records will let us know where to redirect to.
Add a TXT record with these value TYPE: TXT
Example, in this screen I used CloudFlare to define TXT record
Once a request hit our service, we check the domain name of request, fetch the `hanami-forward` TXT record. If we found one, we will do a 302 redirect to the-url-in-txt-record/the-path-in-your-request
As an example, let's say I have domain magicmail.run and this TXT records
Then if someone visit https://magicmail.run they will be redirected to https://hanami.run. If they visit a specific URL such as https://magicmail.run/docs then we will redirect to this full url https://hanami.run/docs
If you want to redirect a subdomain let's say blog.domain.com you need to create DNS records on sub domain level as below:
Now once you go to blog.domain.com, you will be redirected to personal-site.com