• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Robots.txt file/page and mod rewrite

Under Robots.txt Options in XENFORO control panel, this appears on top of the page.
You can have XenForo generate the robots.txt file for you. Please note for this to work, you need to do a mod rewrite that goes: robots.txt => index.php?xfa-robots/index

Does this mean that this goes into the .HTACCESS file in the forums' root folder?

And if so, what exactly is put into the HTACCESS file?

Is this the statement?

RewriteCond robots.txt => index.php?xfa-robots/index   ??
Or do I just drop in

robots.txt => index.php?xfa-robots/index
Any insight would be great, thank you.


Well-known member
Ya that's not default. I remember not seeing it in the previous version, and I am running the latest Beta and it's not in there. So ya I am pretty sure it's an addon. For robots.txt I just created one and uploaded it to the forum root.

Tracy Perry

Well-known member
Look in the add-on discussion area. If I remember correctly there are examples in there for both Apache and nginx in the thread.
Not that it will do you any good since it is nginx related, but mine is
rewrite /(robots.txt)$ /robots.php last;
in the vhost config file.