The issue with your previous site sounds like nameserver issues.
On the site where you purchased the domain, you can edit the nameserver records.
You should only have 2 nameservers:
http://ns1.infinityfree.com
http://ns2.infinityfree.com
No others. Then, after the DNS propagates (could be many hours or even a day or two), go to your control panel on InfinityFree and scroll down to Aliases (Parked Domains). Then, where it says Create a New Parked Domain – type in the domain name you want to point to InfinityFree (e.g. gharteyhall.com). Then, in the select list, choose which InfinityFree site you want to park the domain on to. The, click the “Add Parked Domain” button. After the DNS propagates, you should be able to type in your domain and see your InfinityFree site.
You can use a tool like “https://www.nslookup.io” to see if your nameservers are set correctly.
InfinityFree also has a domain checker tool here: https://dash.infinityfree.com/domainChecker
InfinityFree should be the only nameserver (NS) records that appear for your domain.
If you have a bunch of files in your ‘htdocs’ directory you may want to do the same test you did here earlier. Create a new folder called “backup” and copy all the files inside your htdocs folder into that new backup directory. Then, at the root level of htdocs, create a single file named “index.html” and put the test code you used earlier.
When you type your domain into a browser you should see the test file from your htdocs folder.
If that all works – you can remove the stuff from backup and restore it to the root level of your htdocs folder and see if it works. Keep in mind that if there is some file being referenced in your HTML which doesn’t exist (or which generates an error) – you’ll get an error page.
Make sure all your files are in the right location and are linked to properly in your code. Using the generic test file is a good way to make sure the server is working. Then, you can troubleshoot problems with your HTML code separately and get that working later.