Can I have 2 A records for the same domain

I have a domain set up on my hosting account, which is a shared host.

It has been doing fine, but as the site becomes more popular the response times are getting slower and slower, and sometimes gives 503 error (it's an API, so people are hitting it and need a speedy response time).

It's got to the point now where the shared host is buckling. So I have purchased a VPS which should be able to handle the load.

My question is, instead of directing all traffic to this VPS, is there a way of distributing it between the two?

If I can have 2 A records, how does the browser determine which one it visits first?


Yes you can.

It is called round-robin DNS, and the browser just chooses one of them randomly.

It is a well used method of getting cheap load balancing, but if one host goes down, users will still try to access it.


To be more precise, you can't add "2 different A-records", but you can always add multiple IP addresses to point to the same domain name under a single record set.