Question about google searching

Hi dears,

My question is:

I have to my page the main file called index.php which isnt written (obviously) in the Url (http://www.mysite.com)

well.. now i'm developing mobile and i want to separate the file in 3 parts:
index.php (script only)
index-mobile.php (new page)
index-desktop.php (copy of the content of index.php before mobile version)

when the user access my page, firstly I check their user agent in this new index.php to define if they come from mobile or desktop.

after this, in my index.php i just do
<?php include 'index-mobile.php'; ?> if mobile
<?php include 'index-desktop.php';?> if desktop


my question is (for desktop only), is google able to read this  index-desktop.php include to my main index.php ?

if yes, does google re-index these index-desktop.php for my desktop version ?

also, would this change affects my current indexed pages for desktop ?

if yes, if i set my server to read first default.php and this default.php be used as script to define where the user comes from and then I include index.php for desktop and index-mobile.php for mobile, would this help ?


Thank You
Judson GuimarãesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lucas BishopClick TrackerCommented:
Intentionally creating duplicate content is the equivalent of planting an SEO mine field.

I'd recommend you look into responsive design. You can use a single page and adjust the layout for different screen widths. This is the current best practice being used today.
0
Judson GuimarãesAuthor Commented:
actually my page is e-commerce and not institutional page... and since i'm from brazil, mobile conections sux for responsive design.. i'm using dinamic content.. which for mobile loads an file with less contents and desktop full content.


my main question is about if google is able to read my index.php file and discover that i'm actually including index-desktop.php
0
Dave BaldwinFixer of ProblemsCommented:
No, a PHP 'include' statement is not visible from outside, it just looks like part of the page.  But if they use a 'mobile' bot then they will be able to see that the content is different from the 'regular' view.
0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Judson GuimarãesAuthor Commented:
not even Google could be able to read my php include ??

so.. if google read my page before index.php and the new index.php with include 'index-desktop.php', he will think its the same page ??
0
Lucas BishopClick TrackerCommented:
The php include is handled on the server side, before the page is rendered for Google. When you view-source on your page, you will see what googlebot sees.

However, there is a possibility that Google finds your index-desktop.php by spidering your site and lists it in their index separately from index.php.
0
Ray PaseurCommented:
If you're new to web application development with PHP, it can be a lot to learn.  This article might help you get started in the right direction.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Judson GuimarãesAuthor Commented:
actually i'm 10 years php programmer.. and actually I already knew the answer... the problem is that our SEO guy swear a god that google could read my include 'index-desktop.php' in index.php file, and then it had affected the current indexed pages which the number decreased (coincidentally the date I did this change)

I'll share points for you all.
thank you
0
Dave BaldwinFixer of ProblemsCommented:
To me, SEO is advertising and those people will say anything that pops into their tiny little heads.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Search Engine Optimization (SEO)

From novice to tech pro — start learning today.