Currently I'm redirecting all queries for a single post back to index.php but with a GET variable in the URL, indicating which post was queried. JavaScript grabs this ID and shows the corresponding picture.

I did this because I don't want to render single posts using single.php, just show its content on index.php.

I was hoping single posts would still be findable via Google (and thus SEO optimizable).

Now that I have it all in place, I feel like my posts won't rank well because of the redirect before rendering single.php.

Can anyone shed some light on this?

  • Too many redirects can be a bad thing but normally when people are linking to them. Google will find that which is being redirected and only rank that page, just ensure that your internal navigation since doesn't use redirect urls, and just in case use the rel canonical. Furthermore, with WordPress you don't need to use the single.php, you can setup your own loop and setup a page template for the pages that your referring too, I'm sure your find this information on the WordPress stack, but in terms of SEO no redirects won't harm your SEO in your case. However, I still wouldn't use this method. Commented Dec 7, 2013 at 1:52
  • What kinds of redirect are you using? Add the code on the question.
    – Sisir
    Commented Dec 7, 2013 at 7:11

1 Answer 1


If you are using JavaScript to show content, the Googlebot won't be able to crawl that content and see it the same way that visitors can. Let me illustrate:

  • You had a single post called "My Post" on the URL /single.php?id=my-post
  • You redirect that now to /index.php?id=my-post
  • That page now serves up your home page (this is what Googlbot sees)
  • JavaScript sees the id=my-post on the home page and shows the content for my-post (this is what users see).

You have effectively hidden your content from Googlebot. Furthermore, you have tons of URLs on your site that all show the home page. This is a massive duplicate content problem that is likely telling Googlebot that your site is low quality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.