Welcome to WebmasterWorld Guest from

Message Too Old, No Replies

Redirected domain few weeks ago, 301 Redirect showing in SERPS

3:53 pm on Apr 11, 2014 (gmt 0)

10+ Year Member

I have a website greenwidgets.com

I also have the domain name, green-widgets.com.

I did a 301 redirect of green-widgets.com a few weeks ago so that it points to greenwidgets.com.

Header Checker Tool says:
green-widgets.com 301 Moved Permanently
greenwidgets.com 200 OK

But new pages that are added to greenwidgets.com are now appearing in SERPS as green-widgets.com/page

Why would this be?
4:09 pm on Apr 11, 2014 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

Few weeks is normally too short for Google to process your redirects, but here I mean for the existing pages that you have redirected.

The way I understood your post is that after implementing redirect, new pages that are created and added to domain greenwidgets.com are shown as green-widgets.com.

This would not normally happen unless Google can somehow get that new page at the green-widgets.com domain, as Google would not know of it existing there if you added it to greenwidgets.com domain.

With regards to this new page, if you check green-widgets.com/page, do you see 301 to greenwidgets.com/page ?

Can you check your server logs to see that 301 redirects are being performed consistently, i.e. that there is no period where 200OK is returned for a page that should be redirected?

How are you linking internally? Have you changed all your internal links to link to greenwidget domain?
6:20 pm on Apr 11, 2014 (gmt 0)

10+ Year Member

That's correct - new pages are being listed as green-widgets.com/newpage.htm.

I have just put www.green-widgets.com into my browser and it goes to www.greenwidgets.com, but if I put green-widgets.com/newpage.htm it goes to green-widgets.com/newpage.htm. So no 301.

So what is happening is that only www.green-widgets.com is redirecting. Do I need to tick the wildcard box on the cpanel redirect? Or how do I fix this?

Somehow Google is seeing any new pages as related to green-widgets.com and not greenwidgets.com. I don't understand why. This new page was never on green-widgets.com and has only been uploaded to greenwidgets.com.
10:15 pm on Apr 11, 2014 (gmt 0)

10+ Year Member

Here's what my .htaccess shows:

RewriteCond %{HTTP_HOST} ^green\-widgets\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.green\-widgets\.com$
RewriteRule ^/?$ "http\:\/\/www\.greenwidgets\.com\/" [R=301,L]

Is that correct?

Do I have to literally redirect each individual page or is there a catch all method? There are no pages from green-widgets.com that have the same file name in grenwidgets.com.

And how do I stop Google ranking green-widgets.com/page.htm instead of the genuine greenwidgets.com/page,htm?

Hope someone can help. This is driving me mad!
10:46 pm on Apr 11, 2014 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

Your RewriteCond is capturing everything, the $ at the end will add in the page at the end of redirecting to the new domain - but the RewriteRule is not asking for the rest of the requested URL.

The URL side of the RewriteRule doesn't need to be escaped, but it does need the $ at the end to add the entire requested URL.
Try something like
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
and see if that adds in the full URL.

Get rid of sitemaps you might have on the old site.

IF you have the old site in GWT, there are tools there to help you tell them what you are doing. Don't block robots until you handle the GWT changes.

Then to help keep Google from indexing the old site's pages set your robots.txt to disallow all bots:
User-agent: *
Disallow: /

Robots.txt does not prevent indexing, if the old links are found in links on other sites, and it can still take time to clean it all up.

I'm sure I skipped something, pretty sure others will be here fill in the blanks.
11:06 pm on Apr 11, 2014 (gmt 0)

10+ Year Member

Many thanks for the advice - it's much appreciated.

To be clear, I need to replace:

RewriteRule ^/?$ "http\:\/\/www\.green\-widgets\.com\/" [R=301,L]


RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

and that will prevent new pages that are added to the site (with file names that never appeared on the old domain) from appearing in the serps as olddomain.com/newpage.htm?

[edited by: aakk9999 at 1:58 am (utc) on Apr 12, 2014]
[edit reason] Examplified to avoid auto-linking [/edit]

1:53 am on Apr 12, 2014 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

Not quite, it needs to add the captured information at the end, to add it to the redirect. The RewriteCond has $ at the end:
RewriteCond %{HTTP_HOST} ^www\.green\-widgets\.com$
to capture the entire request. Right now, the captured information is not being added on at the end. It looks like the rule isn't going to work, so it defaults to the original request on the old domain.

The example I gave you adds that $1 back on the end so it gets included in the resulting redirect. Try the same format, putting the actual new domain name where it says example.com:
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

If someone visits green-widgets/small.html, the $1 adds the small.html part on to the URL in your RewriteRule after it rewrites the domain URL.

To keep it from forming a link here, we use "example.com" wherever we need to use a domain name.
8:20 am on Apr 12, 2014 (gmt 0)

10+ Year Member

Many thanks not2easy.

I did as you said, tested it, and all seems to be working correctly now.

Really appreciate your help.
2:32 pm on Apr 12, 2014 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

Happy to hear that it works as you wanted.