On Google Domains, I own www.example.com
. I also have hosting for free at www.university.com/~myname
.
I want to be able to forward
www.example.com
to www.university.com/~myname
,
but I want the domain to still show as www.example.com
.
I also want
www.example.com/something/something.txt
to forward to
www.university.com/~myname/something/something.txt
,
with the URL still showing www.example.com/something/something.txt
.
How can I do this?
(I know this question exists, but the settings page is very out of date: How to mask the domain forward from Google domains without Google app)
Log in to your Google Domains account and choose the Domains you would like to manage. Then, select the DNS tab on the left sidebar. Scroll down to the Synthetic records section. Select Subdomain Forward in the dropdown on the left side.
This is not possible without having someone standup a webserver that will redirect requests.
Using CNAMEs you can mask www.example.com to www.university.com since this translation is purely based on DNS. The concept of www.university.com/~myname is an HTTP concept of URL paths and you need an HTTP server (aka webserver) to do this redirection.
Look at URL forwarding services (NameCheap offers such a service https://www.namecheap.com/support/knowledgebase/article.aspx/545/51/how-do-i-set-up-url-redirect-when-i-use-your-freedns-service when you use their FreeDNS servers for your DNS). You don't need to move your domain registration to them (you can keep that with Google), just move your NS records to namecheap servers to use their redirection service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With