XF 1.2 Debug URLs indexed, set to false - possible to 404 or 410?


Well-known member
I had debug mode turned on a few months back. As a result, it appears Google has indexed some of my URLs twice. This has created a duplicate content issue.

Google has indexed the original URL and the same URL with ?_debug=1.

I have debug set to false, have for a few months, but Google shows thousands of URLs in their index.

For Google to drop these from their index, I would need XenForo to return a 410 (best case scenario) or a 404.

I could see this being an issue for other sites who have enabled debug mode for any length of time, thus creating duplicate content issues and problems with Google.

Thanks in advance for your help.

Jake Bunce

XenForo moderator
Staff member
Add these rules to the top of the .htaccess file in your XF directory:

RewriteEngine On

RewriteCond %{QUERY_STRING} _debug=1
RewriteRule .* - [G,L]
That should do it. "G" returns HTTP 410.