✓ Solved

How do I point a subdomain to different ip to host a service ?

I have a domain example.com setup under linode/Domains that has A/AAAA Record pointing to old website, now I am also self hosted cloud storage service on 443 on a different ip address. I want to point cloud.example.com to this new ip address. Can anyone please point me how should I do this ?

2 Replies

thank you , Now I am trying to update the domain ip but I get 400 response.

TOKEN = 'abcdefghigjlmnopq_assumed_example'
PAYLOAD = {
      "type": "A",
      "name": "test",
      "target": '192.168.1.1',
      "priority": 50,
      "weight": 50,
      "port": 80,
      "ttl_sec": 604800
    }

URL =  "https://api.linode.com/v4/domains/{did}/records/{rid}".format(did=1111111, rid=2222222)

def main():
    headers = {
        'content-type': 'application/json',
        'Authorization': 'Bearer {tkn}'.format(tkn=TOKEN)
        }
    resp = requests.put(URL, data=json.dumps(PAYLOAD), headers=headers)
    print(resp.status_code)

if __name__ == '__main__':
    main()

Fixed

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct