Strange case after moving to a new domain

mahamad3

Regular Member
Joined
Apr 26, 2012
Messages
320
Reaction score
30
Hi

I had a domain example.com, I moved it to sub.example.com and I made the redirect.

The strange point is, if I search with http://example.com it's not indexed (that's normal) but If I search with my brand name, the first result is http://example.com and of course if you click at it, you will be redirected to sub.example.com

Note : The site had been moved and redirected since 1 year.

any one has explanation?
 
The redirect was as following :

header('Location: http://sub.example.com');
exit;

I updated it yesterday to :

header("HTTP/1.1 301 Moved Permanently");
header('Location: http://sub.example.com');
exit;

Do you think it was the cause as it wasn't 301 ?

Yeah I think so. When redirects aren't 301's you can get some odd results in the search engines. Since you added the permanent redirect I would submit a sitemap and you should notice the links showing up like you want them to.
 
Back
Top