I need to add an IP to my hosts file. Google says to "jailbreak" but others say not to do so. It sounds illegal!
Whether it's illegal is debatable (never heard of an individual getting into trouble) but it's not something you should do unless you understand the implications.
Where is the website you are testing hosted? If it's on your local network, the local DNS server solution below is best. If it's on a web hosting service and accessible via the internet then just buy a domain name, and you'll get an online control panel that lets you set the up address.
One solution to your problem is to set up a DNS proxy server on your local network - I'd suggest dnsmasq which can run on a Mac (or a cheap Linux box like a raspberry pi) - then change the DNS setting on your iPad to point to the mac. That way, the hosts file on your Mac (which is easy to edit) will be used by your iPad.
(Edit: when configuring dnsmasq - turn off the DHCP feature unless you know what you are doing and are on your own, private home network
)
Be warned, that's not a drag and drop solution so you'll have to do a bit of homework.
(
Edit: if you're really lucky, your home network router will allow you to add host names to its internal DNS proxy - but its rare on domestic routers).