Dynamically assign a synthetic record to Google Domain

Viewed 177

I own a domain on Google Domains.

I want to create subdomains for my projects dynamically.

For example:

My Domain:
https://adomain.com

Subdomain:
https://project-name.adomain.com

Where the subdomain redirects you to:
https://project-name.com

So when a user navigates to https://project-name.adomain.com - they will be redirected to a completely different website, hosted elsewhere (https://project-name.com).

I know I can achieve this by creating a Synthetic Record via the Google Domains DNS menu: screenshot of the google domains synthetic record dns menu

But I have to manually navigate to the Google Domains dashboard and input my values there.

I was able to find the following question which shows that you can pass credentials via a URL: How can you change the TTL value of a Google Domain Synthetic Record?

I'm not confident about passing my username & password in plain text via a URL to create a synthetic record.

Is there any other way of achieving this? Any resources I can have a look at? An API of some sort? I wasn't able to find exactly what I was looking for.

0 Answers
Related