Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Redirected Wp Blog 4 Days Ago But Not Sure If I Done It Right.


  • Please log in to reply
3 replies to this topic

#1 seodesire

seodesire

    HR 2

  • Members
  • PipPip
  • 45 posts

Posted 08 May 2010 - 04:35 PM

I redirected my WP blog over to a new blog using .htaccess permanent redirect.

It redirects all url's to the new url's.

Here is the code I used. Is that the right way to do it? As G still haven't indexed a single page and have been crawling non stop for 5 days straight.

CODE
#RewriteEngine on
redirect 301 / http://www.newdomain.com/
#RewriteCond %{HTTP_HOST} ^old-domain\.com$ [NC]
#RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]

#RewriteCond %{HTTP_HOST} ^.com$ [nc]
#RewriteCond %{HTTP_HOST} ^www.old-domain.com$
#RewriteRule ^(.*)$ "http\:\/\/www\.new-domain\.com\/$1" [R=301,nc]


#2 qwerty

qwerty

    HR 10

  • Moderator
  • 8,619 posts
  • Location:Somerville, MA

Posted 09 May 2010 - 12:32 AM

I'm not really strong on this stuff, so hopefully someone else will chime in to either back me up or correct me, but the second line you have will redirect a request for any URL on the old domain to the default URL (the home page) of the new domain. If what you want to do is redirect olddomain.com/page.htm to newdomain.com/page.htm, this isn't what you want. It's going to send requests for olddomain.com/page.htm to newdomain.com/.

What I'm not sure about is whether any of the code that comes after that is going to make a difference. As far as I know, the server is just going to do what that second line says, so the more specific instructions you've got later on probably won't do anything.

What happens when you test it? Does a request for a specific page on the old domain send you to that page on the new domain?

#3 seodesire

seodesire

    HR 2

  • Members
  • PipPip
  • 45 posts

Posted 09 May 2010 - 07:29 AM

All of my old posts and root domain all redirect to correct page on new domain, posts pages the lot. But I have a suspicion it's not working like a domain redirect should as with Google not having indexed any pages yet.

Example: domain.com directs to new domain.com

domain.com/facebook directs to newdomain.com/facebook

domain.com/contact to newdomain.com/contact

and so on..

Thanks

#4 Ron Carnell

Ron Carnell

    HR 6

  • Moderator
  • 966 posts
  • Location:Michigan USA

Posted 09 May 2010 - 11:00 AM

QUOTE
I'm not really strong on this stuff, so hopefully someone else will chime in to either back me up or correct me, but the second line you have will redirect a request for any URL on the old domain to the default URL (the home page) of the new domain.

There's an implied wildcard in there, Bob, on both the target and the destination. Think of it as "redirect 301 /* http://www.newdomain.com/*" and it might make more sense?

QUOTE
What I'm not sure about is whether any of the code that comes after that is going to make a difference.

Good eyes, Bob. All of the code, except for that second line, is commented out. smile.gif

QUOTE
But I have a suspicion it's not working like a domain redirect should as with Google not having indexed any pages yet.

You can use a HTML head checker to load the page and examine the return status code. If the code is a 301, as it should be, then you're good to go. Be sure to check more than just one or two pages and be particularly careful to check any dynamic pages that pass parameters in the URL.

In closing, you probably shouldn't confuse Google indexing a page (a spider visiting your site) with Google including your pages in its index. Those are two different things and are always separated by a discrete chunk of time. Be patient. smile.gif





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!