# Safe way to test whether dns\_get\_record() and DNS\_TXT lookups work on my InfinityFree account?

**URL:** <https://forum.infinityfree.com/t/safe-way-to-test-whether-dns-get-record-and-dns-txt-lookups-work-on-my-infinityfree-account/121969>\
**Category:** Hosting Support\
**Created:** [November 14, 2026, 4:59pm UTC](https://forum.infinityfree.com/t/safe-way-to-test-whether-dns-get-record-and-dns-txt-lookups-work-on-my-infinityfree-account/121969 "2026-11-14T16:59:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danmicu](https://forum.infinityfree.com/letter_avatar/danmicu/32/6_449c533f586939b6e5f246632a46421f.png) [@Danmicu](https://forum.infinityfree.com/u/Danmicu)\
**Post date:** [November 14, 2026, 4:59pm UTC](https://forum.infinityfree.com/t/safe-way-to-test-whether-dns-get-record-and-dns-txt-lookups-work-on-my-infinityfree-account/121969/1 "2026-11-14T16:59:55Z")

</div>

### Website URL

[https://danmicu-edu.ct.ws/danmicu\_staging/](https://danmicu-edu.ct.ws/danmicu_staging/)

### Error Message

My staging application directory is protected by an .htaccess rule containing Require all denied, so I cannot access a diagnostic PHP file through the browser.

I do not want to remove this protection or expose a public diagnostic page.

Is there another safe way to test whether dns\_get\_record() and DNS\_TXT lookups work on my InfinityFree account?

Thank you

### Other Information

safe way to test whether dns\_get\_record() and DNS\_TXT lookups work on my InfinityFree account?

---

<div class="post-metadata">

**Author:** ![Lemni](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/lemni/32/68303_2.png) [@Lemni](https://forum.infinityfree.com/u/Lemni)\
**Post date:** [November 14, 2026, 5:00pm UTC](https://forum.infinityfree.com/t/safe-way-to-test-whether-dns-get-record-and-dns-txt-lookups-work-on-my-infinityfree-account/121969/2 "2026-11-14T17:00:18Z")

</div>

_Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look._

I couldn’t find anything in the knowledge base or on the forum that says whether `dns_get_record()` or `DNS_TXT` lookups work on InfinityFree. I also found nothing on a way to run PHP outside the browser, so I can’t give you a sourced answer on either.

The only way I can suggest is general Apache behaviour, not something I found about our hosting. A `.htaccess` rule applies to the folder it sits in and everything under it. A test file in a folder outside your protected staging directory isn’t affected by that rule, so you wouldn’t need to remove the protection. You’d still need to keep the file private yourself, for example with a hard-to-guess name that you delete right after running it.

You’ve also posted the same question in another topic. Keeping it to one topic will make the answers easier to follow.

---

<div class="post-metadata">

**Author:** ![SpookyKipper](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/spookykipper/32/27461_2.png) [@SpookyKipper](https://forum.infinityfree.com/u/SpookyKipper)\
**Post date:** [November 14, 2026, 5:06pm UTC](https://forum.infinityfree.com/t/safe-way-to-test-whether-dns-get-record-and-dns-txt-lookups-work-on-my-infinityfree-account/121969/3 "2026-11-14T17:06:15Z")

</div>

make a new subdomain and test it here, php config is the same across all domains on the same hosting account
