[Pro] php page and 301 re-direct

Hi All,
I have a site that Google seems to not be finding because all of my pages are .php including my index page. I’m really lost on this subject and have not had this happen before. Can anyone help me out on this matter?
Do I need something called 301 re-direct?

Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:

I was told that I needed to do this. I have never run into this issue before.

You need to make sure that index.php is not the “home” link on the nav, and index.php should be 301’d to the root.


freewaytalk mailing list
email@hidden
Update your subscriptions at:

The myth that Google cannot find php pages has not been true for tens of years. Who told you that was your issue?

Walter

On Feb 29, 2016, at 1:36 PM, billy kimmel email@hidden wrote:

I was told that I needed to do this. I have never run into this issue before.

You need to make sure that index.php is not the “home” link on the nav, and index.php should be 301’d to the root.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

One of my clients hired a SEO consultant, pain in my ass, and he said that I had a bad default Url. Google is seeing two pages.

  1. francisinteriors.com
    2.francisinteriors.com/index.php

I see this in his account but it’s a puzzle as to how to fix.

Are You familiar?
Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Okay, see if adding this to your .htaccess file (up to and including creating one of those if it does not already exist) makes any difference. Remember to turn on the Show Hidden Files option in your SFTP application, so you can see it – files whose name begins with a dot are hidden by default in Unix filesystems.

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ "/$1" [R=301,L]

If you add these lines, and the server immediately breaks, just back out the changes and re-save the file. .htaccess files are nice that way – they are loaded on each request, not once per server restart. If you already have an .htaccess file in there, post its contents on a Gist, so we can see what’s going on in there. You can delete Gists later, unlike e-mails to this list, which have a half-life similar to that of carbon.

Walter

On Feb 29, 2016, at 2:22 PM, billy kimmel email@hidden wrote:

One of my clients hired a SEO consultant, pain in my ass, and he said that I had a bad default Url. Google is seeing two pages.

  1. francisinteriors.com
    2.francisinteriors.com/index.php

I see this in his account but it’s a puzzle as to how to fix.

Are You familiar?
Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Ok so that seems to have stopped the homepage from indexing to .php but all other pages keep the .php. Is that ok?

Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:

I imaging I won’t see the error go away in Analytics for a fews days?

Bad Default URL
Unable to load default URL www.francisinteriors.com for property francisinteriors.com.
Adjust property settings | Check again | Ignore | Details

Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Yes, the only pages that will hide now are the “index” pages, so if you had sub-folders in your site, and each of them had an index.php, then it would do the same trick there, I think. It’s important to note that it won’t do anything (in its current form) to index.html pages, so you may need to look at that.

Key learning for you: The issue is not PHP or not, it’s index page vs directory name. And really, it’s not even a matter of preferring the / instead of /index.whatever – it’s a matter of not having the same exact page at two different URLs. If you ask Apache, it would prefer that you always use the index.html or whatever extension, and never link to a bare folder. Apache has to engage its content negotiation module and hunt and peck through the filesystem when you do the latter, so it takes a minuscule extra amount of time to fulfill the request.

Walter

On Feb 29, 2016, at 3:16 PM, billy kimmel email@hidden wrote:

I imaging I won’t see the error go away in Analytics for a fews days?

Bad Default URL
Unable to load default URL www.francisinteriors.com for property francisinteriors.com.
Adjust property settings | Check again | Ignore | Details

Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Thanks for that Walter. Also should I have a robots.txt file on the root as well?

Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:

It can’t hurt, but they are of limited value. The good robots are already nice, and having one can show bad guys where to start looking.

Walter

On Feb 29, 2016, at 3:32 PM, billy kimmel email@hidden wrote:

Thanks for that Walter. Also should I have a robots.txt file on the root as well?

Billy


freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Funny.
Thank you.


freewaytalk mailing list
email@hidden
Update your subscriptions at: