Jump to content

UPDATE REQUIRED Can I set my homepage to a different page for mobile only?

Recommended Posts

Hi people, especially @paul2009: you've posted a seemingly elegant solution to this dilemma before, link below.
It still works, but with an unfortunate serious side effect: google crawl sees the injected code as a redirect, and no longer indexes the page.

Anyone know a way to achieve this without the side effect?


 

Link to comment
  • Replies 5
  • Created
  • Last Reply

Yes, if you are using a template with index pages then this can easily be achieved with just css. Just create two pages within the index, one for mobile and one for desktops.

Then adjust the below code with your page URLs and add it to you websites global CSS.

@media (max-width:640px){#your-desktop-page-URL {display:none!important}}

@media (min-width:640px){#your-mobile-page-URL{display:none!important}}

 

Link to comment
1 hour ago, amotion said:

google crawl sees the injected code as a redirect

That's strange as it shouldn't cause any issues with crawlers. I know for a fact that sites are using it and being indexed correctly.

To help us understand, the issue you are facing, please share the error from Google.

About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.
If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too.

Link to comment

Hmm yes, I'm still troubleshooting it. I had deliberately hidden the mobile friendly page from indexing, as I preferred the main domain to be the one listed in search results. So perhaps it was the combination of the injected code and that?

I also had that injected code on both the main home page and the mobile page, so that they redirected to each other depending on the users screen res. Perhaps those vice versa redirects caused the indexing issue?

For now I've removed both the injected code and the noindex tag on the mobile page, added a link to the mobile page within my site, and requested reindexing. We'll see if  all the pages reappear.

Please let me know if you think the above were the likely causes, and if there's a way to keep the mobile page unlinked within my site, and not indexed, yet have my mobile and desktop pages redirect to one another based on screen size.

I'm nervous about search result visibility with testing now! But when I have time and perhaps a gap when I'm not concerned about search results, I'd like to get it working.

Link to comment
  • 2 weeks later...

Thanks for your responses everyone.

I'm pretty sure this has been fixed (TBC by a future google crawl), most likely by removing the noindex tag from my mobile friendly page that is redirected to for small screens.
I also removed the redirect from the mobile page back to desktop/main homepage based on a larger screen detected, I can't be certain if this also helped (I've done this for another reason: so that google sees my site overall as "mobile friendly").


@colin.irwin not new, the site has been live for at least a couple of years, just these recent changes.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.