Ad

How Does Server Side Rendering Works On Nuxt When Using Dynamic Slugs?

I've been developing an app that users can create a profile and it can be accessed from a URL that contains their username as a slug: https://myexample.com/username

The app is working with an API and every time the user access to the above URL, by using AsyncData from Nuxt. I'm able to get the username and do an API request to get all the information from the user and display it properly.

My concerns are, by not having a static URL to access the users' profiles, is the URL ranking on google?

My analysis is that by loading the URL only with a dynamic slug, Google will not be able to notice the existence of all the users that have a URL, but I'm not sure if my thinking is correct.

My goal is to let the users find their profiles online using Nuxt SEO advantages but I'm not sure if I'm using the correct approach.

Any feedback on this will help a lot, thanks in advance.

Ad

Answer

Google will only index pages it can find when crawling your site. If no links to the users pages exist anywhere on the site, Google has no knowledge of them and they won't be indexed.

That said, you can create a sitemap file and submit this to Google, so that it has a list of all the pages you would like it to index. This way, no internal links are required. Manually creating a sitemap for websites with a large number of dynamic pages can be tedious, however there are usually tools available to automate this depending on your setup.

EDIT

As you tagged this question with Nuxt, you could take a look at @nuxtjs/sitemap.

Ad
source: stackoverflow.com
Ad