Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in AWS by (19.1k points)

I have a website hosted on a shared hosting plan. My domain name is registered at GoDaddy, and the nameservers are those of my shared hosting (so far, all normal).

But I'm trying to figure out how to add a subdomain and point it somewhere else. I would like to point sub.mydomain.com to some other IP (on Amazon AWS). I would like to have it behave like a normal domain, and not a simple header('Location: ...') or window.location.href.

Is this even possible? If so, how do I do?

1 Answer

0 votes
by (44.4k points)

Go to your GoDaddy Control Panel, click on edit and edit the DNS Zone File. Add an “A record” for the subdomain. There will be one existing with an @, that is for the main domain. It might look like this:

Host    Points To

@       <main domain IP address>

sub     <subdomain IP address>

Now, you will be able to access it like sub.domainname.com and also the main domain can be accessed just with domainname.com.

Related questions

0 votes
1 answer
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Dec 1, 2020 in Azure by dante07 (13.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...