Forum Moderators: martinibuster

Message Too Old, No Replies

Should ads.txt be accessible via http directly?

http vs https for ads.txt

         

kkinfy

2:25 am on May 15, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



From our access logs, I could see Google crawlers are accessing ads.txt using both HTTP and HTTPS protocols. Our site uses only HTTPS and hence we redirect all HTTP requests to HTTPS. Hence, google sees a 301 redirect to https://example.com/ads.txt when trying to access ads.txt using http. Is this set up fine or should the ads.txt be accessible directly via HTTP? Should I add an exception to universal 301 redirect for ads.txt?



[edited by: not2easy at 2:29 am (utc) on May 15, 2021]
[edit reason] readability [/edit]

phranque

6:34 am on May 15, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



assuming your ads are served only on https pages there should be no issue with redirecting non-secure requests for ads.txt to https.

lucy24

3:55 pm on May 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Look again at your logs, and confirm that G is following-up those redirects, requesting ads.txt by HTTPS.

Depending on who else has been requesting the file, you may decide it's appropriate to exempt ads.txt from the HTTPS redirect. (I do this for robots.txt, and also--tangentially--for error documents.)

lammert

6:06 pm on May 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The http and https versions of a domain are different sites in Google's view. That is why you can register them independently in Google Search Console. If you serve your ads on the https version, you should also serve the ads.txt on the https version. Redirecting all http traffic to https is fine.