amotion Posted October 14, 2019 Share Posted October 14, 2019 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
SnazzyView Posted October 14, 2019 Share Posted October 14, 2019 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}} snazzyview.com Link to comment
paul2009 Posted October 14, 2019 Share Posted October 14, 2019 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
amotion Posted October 15, 2019 Author Share Posted October 15, 2019 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
colin.irwin Posted October 15, 2019 Share Posted October 15, 2019 @amotion Are you working on a new(ish) site? The reason I ask is that Google often indexes a new site and includes all of it in its search database and then shortly afterwards drops some or all pages before adding them in again days or weeks later. If you're looking for a Squarespace Developer, drop me a line. Link to comment
amotion Posted October 24, 2019 Author Share Posted October 24, 2019 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.