Mobile app version of vmapp.org
Login or Join
Merenda212

: Is having multiple index files for various devices bad SEO? I have two html files, one for mobile and the other file for the other devices. I am detecting mobile devices by using PHP a if

@Merenda212

Posted in: #Desktop #Mobile #Php #Seo

I have two html files, one for mobile and the other file for the other devices. I am detecting mobile devices by using PHP a if ($modile) and this is followed by an include("example.html"> to determine which index is to be viewed.

Here's an example of my code:

<?php
if($modile) include("index_m.html");
else include("index.html");
?>


Each indexes are slightly different than one and another, and look like this in the address bar:

www.example.com/index.html http://www.example.com/index_m.html


Question:

Since my site is using two index files, will search engines consider this bad SEO?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Merenda212

1 Comments

Sorted by latest first Latest Oldest Best

 

@Annie201

While exposed index files isn't a URL-friendly approach, your idea of redirecting to a specific index file based on what the client's device is actually a fabulous start because then search engines (especially google) can understand that you have a desktop and mobile version of your page and google will try to display the most relevant page to the client based on his/her device.

As an added bonus, your idea will score well when you run it through Google's page-speed insights since it likes to check your page for mobile device compatibility as well. I believe google webmaster tools (search console) has a section where it would complain if your page is not mobile friendly.

Google has an article on how you can add code to make your separate URLs more helpful to google when it comes time for it to index them.
developers.google.com/webmasters/mobile-sites/mobile-seo/separate-urls

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme