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

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

Discussion in 'Troubleshooting and Problems' started by cmeinck, Mar 3, 2014.

  1. cmeinck

    cmeinck 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.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Add these rules to the top of the .htaccess file in your XF directory:

    Code:
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} _debug=1
    RewriteRule .* - [G,L]
    
    That should do it. "G" returns HTTP 410.
     
    cmeinck likes this.

Share This Page