homepage Welcome to WebmasterWorld Guest from 54.211.47.170
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Can I use Url Redirect Code in the head of the page
venunath




msg:4605382
 9:19 am on Aug 28, 2013 (gmt 0)

Hi All,

Can i use Url Redirect Code in header of each pages for which i want to re-direct (old page to new page)?

Or i need to place in .htaccess file

Suggest me.

 

aakk9999




msg:4605387
 9:57 am on Aug 28, 2013 (gmt 0)

I presume you are refering to meta refresh with zero seconds that you would put in the <head> section of each page, which would then cause browser to redirect the user to a target URL.

It is recommended that you use .htaccess It may also be less work using .htaccess as you may achieve redirects for multiple pages on your site with a few well constructed rules. Using .htaccess will also be faster.

It was said that Google treats meta refresh with zero seconds as 301 redirect. I do not have experience of a site that uses meta refresh extensively to redirect many page, but the idea makes me uneasy. Using meta refresh should be your last resort, if you do not have the access to your .htaccess file.

Interestingly, I have seen recently browser redirecting based on meta refresh even when the line is not put in the <head> section of html, but was in <body> instead.

venunath




msg:4605388
 10:09 am on Aug 28, 2013 (gmt 0)

Thanks for reply. I am not using or talking about meta refresh tag, its a PHP 301 Redirect code which help us to redirecting old page to new page.

So, is PHP 301 Redirect code is seo friendly?

lucy24




msg:4605397
 10:24 am on Aug 28, 2013 (gmt 0)

Is the 301 issued before the page is built, so the user (human or robot) never loads the originally requested page at all? If so, the search engine has no way of knowing where the redirect came from.

But in general, if the redirect can be done in htaccess rather than in an individual page, use htaccess. Keep all the redirects in one place, and consolidate them so you never get multi-redirect chains. (Never mind the search engines: multiple redirects are bad for users with slow connections.)

levo




msg:4605399
 10:52 am on Aug 28, 2013 (gmt 0)

Yes, you can. There won't be any difference between .htaccess redirect and php redirect.

venunath




msg:4605401
 10:56 am on Aug 28, 2013 (gmt 0)

Is there any limit ?

aakk9999




msg:4605403
 11:12 am on Aug 28, 2013 (gmt 0)

So, is PHP 301 Redirect code is seo friendly?

Sorry, I have misunderstood what you asked.

There is absolutely no issue with generating 301 via PHP. There is no limit on how many pages either.

The client will not know any difference. So if this is your preferred choice, go ahead with no fear.

venunath




msg:4605404
 11:13 am on Aug 28, 2013 (gmt 0)

why i have implemented the 301 redirection because my website was hacked and all product pages are used to be in dynamic format like this /Products.php?id=11

And i have resolved the hacking issue and implemented 301 re-directions for all major 80 pages and after few months i got the below message in GWT

Subject: Big traffic change for top URL

==================================

"The number of clicks that your site receives from Google can change from day to day for a variety of factors, including automatic algorithm updates. However, if you have recently made significant changes to the content or configuration of your site, this change may be an indication that there are problems."

=================================

Now What to do ? How to bring my traffic back?

aakk9999




msg:4605412
 11:38 am on Aug 28, 2013 (gmt 0)

If I understood well, you have created new URLs for these 80 products and redirected page-to-page from old URLs to new URLs.

Do new URLs now rank in place of old URLs ?

With regards to the above message in WMT, I get them periodically for pages that are of seasonal nature and therefore there are periods of sharp increase in CTR, as well as drop of CTR thereafter. In both cases I get this message in WMT.

What I would be looking also is the impressions figure combined with "average position" (however unreliable it is). If the impressions died and your average position dropped, it may be that the interest in subject remained the same, but you are not ranking well enough any more.

Now What to do ? How to bring my traffic back?

I would firstly do the analysis to see:
- are my "new" URLs (URLs to which the old redirect to) rank as well as the old URLs did
- if not, verify that there is no tecnical problem with execution of 301 redirect
- see if you can isolate which URL has traffic drop or is it across the board
- see if you can isolate which keywords have you "lost" (to a degree at least, because "not provided" will not allow for a complete picture)

Planet13




msg:4605427
 1:49 pm on Aug 28, 2013 (gmt 0)

I once redirected my most popular page via a 301 redirect to a new page.

Once google indexed the new page, I got that same message: that my most popular page had seen a big decrease in traffic.

Of course, it was because all the old traffic was now going to the new page, which had been properly redirected.

So do what aakk9999 suggests:


- are my "new" URLs (URLs to which the old redirect to) rank as well as the old URLs did
- if not, verify that there is no tecnical problem with execution of 301 redirect
- see if you can isolate which URL has traffic drop or is it across the board
- see if you can isolate which keywords have you "lost" (to a degree at least, because "not provided" will not allow for a complete picture)

venunath




msg:4605636
 4:17 am on Aug 29, 2013 (gmt 0)

Hi aakk9999,

-No, new urls are not ranking as old urls used to rank.
- Crosschecked and verified, no technical problem with execution of 301 redirect
- All new urls which are redirected page-to-page from old URLs to new URLs as loss there keyword positions
- minus 50 degree found and all new pages (keywords) are ranking to irreverent pages like guides..

chikitado




msg:4605637
 4:26 am on Aug 29, 2013 (gmt 0)

Yes, you can
you also can use .htaccess redirect or php redirect.

JD_Toims




msg:4605644
 4:36 am on Aug 29, 2013 (gmt 0)

So, is PHP 301 Redirect code is seo friendly?

As people have said previously, absolutely!

I run most redirects and rewrites through PHP on more than one site and there's no noticeable difference I've found, so if you prefer to use PHP rather than .htaccess, my opinion is, and my experience tells me, you should: Go Ahead!

aakk9999




msg:4605701
 8:58 am on Aug 29, 2013 (gmt 0)

This could mean that your site is still affected by past hack you had.

Did your original (old) URLs dropped as a result of hack? I am curious why did you create new URLs and redirected once you fixed hacking issue? Is it because you have moved to new URL structure which does not have querry string (SEF URLs)?

venunath




msg:4605718
 10:37 am on Aug 29, 2013 (gmt 0)

Hi aakk9999,

Did your original (old) URLs dropped as a result of hack?


- After getting hacking issue we have created the new pages.

I am curious why did you create new URLs and redirected once you fixed hacking issue?


- After getting hacking issue, we have created the new urls to avoid sql injections.

Is it because you have moved to new URL structure which does not have querry string (SEF URLs)?


- yes and to avoid sql injections and query string in url(SEF URLs).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved