|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
#1
|
||||
|
||||
|
I inherited a website last July that was all done in frames and images (ie. text was actually a photo of text), but the file extensions were .html. There were no meta-tags, no page titles, and the only pages that had real text were the home page (a few sentences) and about-us page. Nevertheless, the site had a page-rank of 3 (!). I rewrote the entire site using SEO-friendly practices (added meta-tags, used all real text, removed all tables and did everything in pure css using php includes, added a ton of content, used <h1> tags etc).
Because of Yahoo's hosting limitations (no .htaccess), I had to change all the file extensions to .php. I did redirects for all the html files in the only way I could without server access or an .htaccess file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>HTTP/1.1 301 Moved Permanently</title> <meta http-equiv="refresh" content="0;URL=http://www.sargentsfineart.com/index.php"> </head> <body> </body> </html> After all that effort, you would think the page rank would have gone way up, but instead it went down to 2!! So my question is, do the Google search engines rank .html page extensions higher than .php file extensions? Or do they assume that .php means that the file is all code and just skip them? Or how do you explain the drop in the page rank? It is very discouraging to say the least. I figure if anyone would know, it would be you guys, so please elucidate this for me. Thanks very much. erin ![]() PS. In case this is a factor, I should mention that I created all the pages (except the homepage, about us etc) as dynamic pages loading the content data from a mySQL database into templates filled with php variables. But I was told that bots view the pages in their rendered states, just as a viewer would see them. I hope this is true. (?) |
|
#2
|
||||
|
||||
|
It is generally true, but doing redirects for the HTML pages in this way (without using the correct status code) probably means that the search engine still indexed them, and ranked the page lower thanks to all these contentless pages. You'd have been better off just deleting the pages. Also, <meta> redirects are not part of any standard and may be ignored entirely by the user agent, be it a browser or a search engine's spider: you must include a link to the page to which you're redirecting in the body of the HTML.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#3
|
||||
|
||||
|
I did delete the original pages and replaced them with those lame redirects. What would a proper redirect look like?
|
|
#4
|
||||
|
||||
|
Last month I moved the site to a hosting company that allows .htaccess files, so I can now change the filenames back to .html extensions, but am not sure if it is worth the effort. Does anyone there know anyhting about SEO? Would this make any difference to the page ranking? And if I changed the file extensions, what is the best way to notify the search engines of the name change? I don't want to lose what ranking already exists.
I would really appreciate some guidance in this area. Mahalo, erin |
|
#5
|
||||
|
||||
|
Nope. No search engine/person would actually CARE if your page is under a .html extension or .php
It might be a security risk putting your pages as .php, but "obscurity is no solution to security issues"
__________________
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM. Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide |
|
#6
|
||||
|
||||
|
Quote:
Code:
<?php header('HTTP/1.1 301 Moved Permanently');
header('Location: ' . ($url = '/location/of/new/page.html')); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="refresh" content="0;URL=<?php echo $url; ?>">
<title>Page Moved</title>
</head>
<body>
<p>This page has been moved to <a href="<?php echo $url; ?>"><?php echo $url; ?></a>.</p>
</body>
</html>
Quote:
Code:
RewriteEngine on RewriteRule .php$ .html [R]
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#7
|
||||
|
||||
|
Dear tech_support:
Thanks, but I'm a bit unsure of your answer. Are you saying that there is nothing to be gained from an SEO standpoint by my changing all the pages to .html? But are you also saying I should do it because using a php extension is a security risk? How is it a security risk? And you really lost me with "obscurity is no solution to security issues." Admittedly I am just new to forums and am still trying to figure out what some of the initials stand for, but I feel like a total moron when I need every sentence translated. Is there some forum secret lingo page I need to read? Sorry if I am a bit dense here. Thanks, erin Last edited by kuau; 12-29-2007 at 02:17 AM. Reason: to make it clear to which answer I was referring |
|
#8
|
||||
|
||||
|
Dear Twey: Thank you so much for showing me the proper code. I read somewhere that after a certain length of time the search engines have updated their indexes so presumably you wouldn't need the redirects after a while. Do you know if that is true and how long it would take?
If I add this to the .htaccess file: RewriteEngine on RewriteRule .php$ .html [R] does that mean I just leave all the files with the php extension? And, if I do it that way, is it just as good as manually changing the file extensions? Not sure what you meant by the performance issue comment... do .html files execute faster than .php files? Thanks a million. Sorry for all the questions but I need to understand things thoroughly (yes, I drove my teachers nuts, but was valedictorian). erin
|
|
#9
|
||||
|
||||
|
Quote:
Quote:
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#10
|
||||
|
||||
|
Quote:
__________________
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM. Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|