I want Google to index the content in the link format domain/u/username, what should I do?

I want Google to index the content in the link format domain/u/username, what should I do?

I have removed the Disallow: /u part to let the link format domain.com/u be indexed by Google, but what should I do if I want the slug format domain/u/username to be indexed by Google? Is there any other configuration?

I have not logged in and cannot access the slug format: domain/u/username, so I see that it is a problem for Google to index this slug format (attached image).

Thank you for supporting me, I am new to source discourse so there are still many things I do not understand. Thanks!

Hello :wave:

Is this site setting enabled on your site?
hide user profiles from public

If yes, than disable it and you’ll be able to access user profiles without login too.

3 Likes

Are you sure your users are equally happy that you would like to tell whole wide world about their membership and some other stuff?

7 Likes

Thanks a lot!

2 Likes

but I still can’t submit the link in the form of domain/u/username to index with Google, what else do I need to open?

(I have attached the image for you to see the status)

If I remember right that limit comes a bit deeper than robots.txt. Sure, it is quite fast test allowing /u in robots.txt. But if it comes deeper from the core you may need a plugin.

Dig here. That was a thing perhaps a year ago, came along with SEO-stuff, and there was strong reason why it is not allowed.

1 Like

I put it in robots.txt (attached image) but it didn’t work, so I came here to ask you.

Does “View live test” give you any more information?

1 Like

It’s probably because user profiles send this HTTP header:

  • x-robots-tag: noindex

You can see it if you run this command in a terminal, replacing <url> with the URL of a user profile:

curl -sSL -D - -o /dev/null <url>

If you remove the robots.txt rule, Google will see that header and deindex the URLs.

Google’s documentation:

1 Like

I know the url is Noindex but I don’t know where to edit it in the source discourse. In the robots.txt file, the Disallow: /u part has been removed. I have attached a photo.

Help me index slug into username of source code?

I want to open index for this slug domain like this example: https://domain.com/u/toannguyen/activity (example link), what do I need to do in the discourse source code?

Currently, when I submit this type of link in Google Search Console, it says it is blocked from indexing. Hope to get help?

Thanks team so much!

I don’t know, but why would you like to do that? It isn’t something that someone would search for. It doesn’t improve your SEO, and all allowed URLs are already reachable to Googlebot.

1 Like

What is the local community development model I need to do? I have made this public to my members!