Why does a website redirect to another website?

Why does a specific google result's link to my website redirect to my home page?

  • So I just noticed this about my website: When i search specific terms on google and a result shows up linking to a specific page on my website, after clicking that link it just takes me to my home page instead of the specific link. I noticed that the url that shows up on google does NOT include the "www." I tested out specific links with and without the "www" and what i realized is that the specific links withOUT the "www" redirect to my home page while the links with the "www" take me to that specific page. My site is made with Magento, and I have a 301 redirect enabled. Anybody know what I can do to fix this?

  • Answer:

    Sounds like a problem with .htaccess instead of rewriting each url from non-www to www, it is rerouting all of your non-www's to the home page. I would remove your current options and just add in: RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1[R=301,L] to your .htaccess file. Goodluck

Jordan Levet at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.