Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

ads.txt issue

403 error when redirected from http to https

         

Marcellowitz

4:20 pm on Apr 4, 2020 (gmt 0)

5+ Year Member



My website <snip> is ssl secured and installed in the "private_html" folder. Through a htaccess file in thee "public_html" folder all the http-traffic is redirected to https. This is working fine, except for the ads.txt -file. This file has been generated by the WordPress Ads.txt Manager Plugin.

Results:
https://example.nl/ads.txt shows the content of the ads.txt file
http://example.nl/ads.txt results in an error, showing: https://example.nl/403.shtml

Who can help me out?

[edited by: not2easy at 4:33 pm (utc) on Apr 4, 2020]

not2easy

4:45 pm on Apr 4, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi Marcellowitz and welcome to WebmasterWorld [webmasterworld.com]

Two questions:
The ads.txt file is normally a small text file that you can upload to your root directory, no need to use a plugin - unless you are working with multiple ad services. Is that the case?

I'm not sure why your WP is installed in a private folder, does it require visitors to login to view your site? The 403 error means access is forbidden and it is bypassing the WP installation as indicated by its .shtml file extension.

While we do not discuss specific sites, WP is a basic platform that has basic components and settings. Have you set up your Admin> General > Settings to reflect the https status and location? Unless there are other existing files in your root directory it does not usually require an additional rewrite rule - AND the placement of additional rules can cause unexpected behavior.

(Note: I unlinked your URLs so others can see them, also because our Terms of Service do not allow links to your site)