I have a website for my Minecraft server. I need to set the same domain name up for both. So, if I went to my browser and typed www.ChaoticMC.com it would take me to my Website and if I was in Minecraft and I typed in chaoticmc.com it would take me to my server. I have already done the Minecraft server part but I can't figure out how to do the Website part too. I hope I posted this question in the correct place if not, I am sorry.
(I'm assuming you're using an HTTP proxy like CloudFlare, or your server and web site are on different computers, and therefore the straightforward approach of using the same IP and different ports won't work. I'm also assuming you meant to put both sites on "chaoticmc.com", not one on www and the other not.)
What you want to do is possible, but not necessarily a good idea. Using an SRV record, you can have a web server and Minecraft server on the same address. Some computer configurations (be it faulty routers, buggy antivirus, or just bad DNS resolvers) will not see SRV records, and players with those configurations will not be able to connect to your server. If this doesn't concern you, then you can carry on, otherwise just use separate domains. It's less hassle.
Minecraft supports SRV records, but browsers don't, so you'll need to replace your existing DNS record with one for your web server.
First, create a separate A or AAAA record that points to your Minecraft server. It doesn't matter what you name it, as long as it's different from your web server. Let's say it's "play.chaoticmc.com".
Next, create an SRV record with the name "_minecraft._tcp", a priority and weight of whatever you like (since you only have one SRV record, they don't matter), and a port of 25565 (or the port your server is on if it's non-standard).
Set the target to the record you created previously, which in our example would be "play.chaoticmc.com".
On CloudFlare, the "service name" is _minecraft, protocol is TCP. The rest is the same.
On more primitive DNS providers, you may need to specify it purely as text, in which case it will be "SRV 1 1 25565 play.chaoticmc.com." for our example. (note the trailing period)