I didn’t create this website in Jekyll or any other static site generator. This game was developed and I have added onto the code to make the game into the website. I am very very new to this and any help would be much appreciated
Updated on my end. I put the code in the folder with my index.html. When I did it this way the site launched incorrectly. Do I need to add the code directly in the index.html you think?
What google documentation are you referring to? I will read through it.
He said he’s not super familiar with it, so, you probably don’t have much luck here. You might try searching. Here’s one link I found: Ads.txt guide - Google AdSense Help. I have never used AdSense, so, I am not very knowledgeable about this topic either, but, in that link, Google says that you need to add the .txt file in your website’s root, which means, the folder in which you have your home page’s index.html. I can’t see why adding that file should break your website. Just download the file from your dashboard, copy it to your publish folder and upload the website again.
Why’s your index.html inside a Index folder. Technically, your website’s address now is yourdomain.com/index/. And if you’ve used relative links, it probably won’t work.
You should probably move that index.html out of the Index folder. That’s the root of your (actually most of the) website(s). If you’re using a different configuration, sorry, we probably can’t help you unless we actually see the site’s source code.
I am in need of adding in an ads.txt file, robots.txt file and .htaccess file, I publish using Git. Can I ask how would I go about publishing the files mentioned into my root directory?
A .htaccess file serves no purpose on Netlify. What does it contain?
As for the ads.txt and robots.txt publishing these to a domain root is possible, but the process will vary depending on how the site built.
If the site is plain HTML/CSS/JS, then placing them in the directory that is published will work. If using something like React then placing the files in the public directory will see them copied to the build directory which is then deployed. Vue, Next.js, et.al. are similar.
If you have further questions or issues, do not hesitate to reply.
Thank you for the quick reply. I wanted to test a domain block using the .htaccess file but it’s not a must for me so I can skip this.
Regarding the ads.txt and robots.txt files I have done as of you have said and placed the files in the public directory, this has worked for my Next.js site.