Kazetsukai / onetech

Automated Crafting Guide for One Hour One Life
MIT License
31 stars 24 forks source link

Poor SEO #78

Closed ryanb closed 5 years ago

ryanb commented 6 years ago

This isn't very crawler friendly at the moment. Google and others have some trouble with SPAs. Searching something like "one hour one life craft door" has the site show up pretty far down, and doesn't go directly to the page. Some resources:

ryanb commented 6 years ago

Looking into this a bit more, I think the best solution is to use the Vue Router with History Mode along with this GitHub pages workaround. We can then add a sitemap and ensure there are crawlable links around the whole app. This should resolve the majority of SEO issues.

Alternatively we could mess with prerendering or move away from GitHub Pages to do server-side rendering. Both of these are heavy solutions which I don't think are necessary.

ryanb commented 6 years ago

Despite these changes, the pages still aren't showing up in Google. I need to look into this more.

ryanb commented 6 years ago

The custom domain is all setup now which will probably improve SEO. I've also setup the site with Google's Search Console which will show me what's wrong once it indexes the site (in a day or two).

ryanb commented 6 years ago

Looks like Google is reporting a 404 error on a number of pages even though those pages work when I visit. I don't think Google likes the 404.html hack that is described here.

I might put this on a cheap VPS in the near future so we can have true route redirects.

ryanb commented 6 years ago

Google Search Console is reporting this about the indexing:

screen shot 2018-06-19 at 12 26 18 pm

It is intentionally excluding the URLs because the server reports a 404 status, even though we redirect on the client side and the SPA hack was supposed to work with Google indexing.

I recreated the sitemap to use the onetech.info?p=... URL format which will result in no 404s. Let's see if Google likes that.

If this doesn't work, setting up a separate server seems like the only other option.

Kazetsukai commented 6 years ago

Using # URLs should still be viable and fine for SEO

On Wed, 20 Jun 2018, 07:29 Ryan Bates, notifications@github.com wrote:

Google Search Console is reporting this about the indexing:

[image: screen shot 2018-06-19 at 12 26 18 pm] https://user-images.githubusercontent.com/161/41619713-10e104fe-73bc-11e8-8cec-c03a89a1c413.png

It is intentionally excluding the URLs because the server reports a 404 status, even though we redirect on the client side and the SPA hack https://github.com/rafrex/spa-github-pages was supposed to work with Google indexing.

I recreated the sitemap to use the onetech.info?p=... URL format which will result in no 404s. Let's see if Google likes that.

If this doesn't work, setting up a separate server seems like the only other option.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kazetsukai/onetech/issues/78#issuecomment-398517367, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5GRv9Lskk3qxx_LVd_oCSfKu-ljocJks5t-VEXgaJpZM4T3Chh .

ryanb commented 6 years ago

Really? Everything I’ve read says Google doesn’t like URL hashes to represent separate pages. See: https://www.google.com/amp/s/www.seroundtable.com/amp/google-no-url-fragments-23449.html

Kazetsukai commented 6 years ago

Yeah, have run into that. In practice at my workplace it hasn't caused us SEO problems, although we are moving away from it longer term. Something cheeky like cloudfront is also possible: https://keita.blog/2015/11/24/hosting-a-single-page-app-on-s3-with-proper-urls/

On 20 June 2018 at 20:25, Ryan Bates notifications@github.com wrote:

Really? Everything I’ve read says Google doesn’t like URL hashes to represent separate pages. See: https://www.google.com/amp/s/ www.seroundtable.com/amp/google-no-url-fragments-23449.html

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Kazetsukai/onetech/issues/78#issuecomment-398667148, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5GRiSJJw3OKMXau29KehQ7yN3SDROgks5t-gcRgaJpZM4T3Chh .

ryanb commented 6 years ago

Something cheeky like cloudfront is also possible:

Yeah, Cloudfront would be cheeper than a VPS, although it would be nice to have a persisted local Git repo + cron job that we can do git pull every few minutes and auto-update the site with new content.

We could get fancy and use something like Amazon Lambda and communicate with GitHub through the API to check for changes and request just what we need, however not sure about sprite processing and memory usage. Also sounds like a lot of work to setup. ;)

Kazetsukai commented 6 years ago

Again cheeky, but you could probably get away with free tier codebuild.

On Thu, 21 Jun 2018, 07:48 Ryan Bates, notifications@github.com wrote:

Something cheeky like cloudfront is also possible:

Yeah, Cloudfront would be cheeper than a dedicated VPS, although it would be nice to have a persisted local Git repo + cron job that we can do git pull every few minutes and auto-update the site with new content.

We could get fancy and use something like Amazon Lambda and communicate with GitHub through the API to check for changes and request just what we need, however not sure about sprite processing and memory usage. Also sounds like a lot of work to setup. ;)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Kazetsukai/onetech/issues/78#issuecomment-398874051, or mute the thread https://github.com/notifications/unsubscribe-auth/AA5GRikpudIroKdPiF25_V73W6-2AKS2ks5t-qcYgaJpZM4T3Chh .

ryanb commented 6 years ago

Interesting. I didn't consider a build service but that might just work.

ryanb commented 5 years ago

The app is now fully hosted on a VPS so the 404 hack is no longer necessary. I think this will help with SEO but time will tell.

ryanb commented 5 years ago

Moving to a VPS hosted page has helped SEO significantly. Since I have control over the Nginx config I no longer need to do the 404 redirect work-around. Google is still excluding a lot of the URLs in the sitemap, but I don't think there is much more I can do about that for now.