OK, I JUST GOT THE TXT VALIDATION METHOD TO WORK, even with Discourse’s “restrictions”. So, if you want to do that to avoid tinkering with DNS stuff (which, eeeeeeeeee… for me is much scarier than tinkering with a webserver, tho of course your mileage may vary).
You’ll need to be able to edit your nginx configuration file for your discourse install. Where exactly that is depends on where (and with what) you’ve installed your discourse. In my case, I did a baremetal install without docker. I can find it at /etc/nginx/conf.d/discourse.conf – your mileage may vary.
In that file will be a location block like so:
location / {
....
}
where there will be a number of internally nested location directives as well
create a new one, nested in here as well (but not nested in any other location!)
location /stupidfilename.txt {
alias /var/www/stupidfilename.txt;
}
where stupidfilename.txt is whatever special name file they want you to add, and where the PATH
(/var/www ) is outside of the discourse stuff but accessible for urls in general on the server. What makes this work is that / is root for discourse so the url will look like it is under your discourse at http:/ /discourse.example.com/stupidfilename.txt (spaces added to disable bogus link)
so… place the file outside discourse, set up the location to alias to it and restart your nginx.
tada…
(I went back and edited this answer for readability etc since I marked it as my solution)