Home > database >  Google Domains : create a custom domain based on a url path
Google Domains : create a custom domain based on a url path

Time:02-11

I have a laravel projct deployed on a virtual machine on GCP and I need to create a subdomain for it based on its url , the url looks like this : 34.90.86.243/questions_bank/public/ but when I wanted to add the url to the data field on google domains I got confused on what type I should use to make this up to work. see this image

so which type should I choose ? and if there is an other way to do it please tel me

CodePudding user response:

You cannot create subdomains based upon URL paths (/questions_bank/public/).

DNS servers manage subdomain resource records based upon IP addresses (A and AAAA) and CNAMES (which resolve to A and AAAA resource records.

If your goal is to create a subdomain questionsbank as in questionsbank.example.com from the IP address 34.90.86.243, create an A with the Host name questionsbank, Type A, TTL 86400, Value 34.90.86.243.

In your webserver (Apache, Nginx, etc.) you can use URL Rewrite to map subdomains to URL paths.

  • Related