Do spiders like HTML more than PHP?

watdahel

Golden Member
Jun 22, 2001
1,661
12
81
www.youtube.com
I initially had my website all done with html files. Within a day of uploading my website it was searchable on Google. Which was great. Recently, I started doing some PHP and had to convert all my files to .php files. I uploaded my new website and it's been more than a week and it still doesn't show on Google. It does list the old html files in the search results but the links are broken since the html files they point to are now php files. Some parts of my website have been cached by google and shows the old, html version.

Do search engine crawlers avoid php files? Can a web server block these crawlers from accessing php files and not html files? What's my solution?
 
Oct 27, 2007
17,009
5
0
I strongly doubt it. All the browser sees is the HTML output. You should probably redirect those broken links so they don't return a 404 error though, because Google will penalize you for broken links. Do you have a valid site map? These seem to help for initial crawling.
 

Aluvus

Platinum Member
Apr 27, 2006
2,913
1
0
Google doesn't care about the file type. They have probably just not spidered you since you made the switch.

And yes, absolutely set up redirects.
 

KIAman

Diamond Member
Mar 7, 2001
3,342
23
81
Also add in google analytics tracker if you haven't already (free). That should get their attention once you start sending them traffic data.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
analytics data won't affect search rankings at all.
file extension won't affect search rankings either.

you SHOULD 301 redirect all old files to their new files ASAP.
Make sure your sitemap references the new files.
 

KIAman

Diamond Member
Mar 7, 2001
3,342
23
81
analytics data won't affect search rankings at all.
file extension won't affect search rankings either.

you SHOULD 301 redirect all old files to their new files ASAP.
Make sure your sitemap references the new files.

I'm not entirely sure of search rankings but the OP is specifically asking about getting his site indexed at all and google analytics DOES affect that.

Also, OP I forgot to mention to link your site here on this forum.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I'm not entirely sure of search rankings but the OP is specifically asking about getting his site indexed at all and google analytics DOES affect that.

Also, OP I forgot to mention to link your site here on this forum.

You can link a personal or blog type site in your sig, but dropping any other links for the purpose of SEO will violate the TOS and a mod will edit the link(s) out. Just FYI.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
I'm not entirely sure of search rankings but the OP is specifically asking about getting his site indexed at all and google analytics DOES affect that.

Also, OP I forgot to mention to link your site here on this forum.

Having analytics set up will not aid in getting your site indexed, or crawled.

having google webmaster tools set up can though.
 

watdahel

Golden Member
Jun 22, 2001
1,661
12
81
www.youtube.com
I created the sitemap and uploaded to google webmaster tools. Let's see what happens. If I do the url redirects that entails creating 60+ html files. Is there an automated way to do this or am I stuck with manual editing?

Is Google Analytics similar to Sitemeter?
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
you can do the redirects with a single htaccess file

and you NEED to do it, else any pagerank of old pages will flush away
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
You need to create an .htaccess in your document root that contains a bunch of lines like this:


RedirectPermanent /oldpage.html /newpage.php
 

ScottSwing

Banned
Jun 13, 2010
447
0
0
Do your URLs look like this:

example.com/index.php
example.com/blog.php

or like this:

example.com/photos.php?id=r23434t4
example.com/products.phphl=en&source=hp&q=search&aq=f&aqi=&aql=

If it's the latter, you may want to clean that up with mod_rewrite, as search engines are less eager to index pages that are likely not to exist the next day.
 

watdahel

Golden Member
Jun 22, 2001
1,661
12
81
www.youtube.com
I edited the .htaccess file and was able to redirect the old html links to their php counterparts. This worked as long as the php files are in the same directories as the old html files. How do I do the same if I changed the directory of the php file?

This is what I used:
RedirectMatch 301 (.*)\.html$ http://www.abc.com$1.php

I used RedirectPermanent but it didn't do anything.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
you can redirect on a case by case basis too.

redirect 301 /file.html /newpath/tothesame/file.php

just put them above the catch all
 

johnny.dacu

Member
Jul 6, 2010
54
0
0
From what i know it has no importance if is php or html. If you use PHP you might consider to create more frendly urls, and a valid markup on output.