# Canonical structure for /u/\* causing many urls to be indexed

**URL:** <https://meta.discourse.org/t/canonical-structure-for-u-causing-many-urls-to-be-indexed/226237>\
**Category:** Marketplace\
**Created:** [May 5, 2022, 3:58pm UTC](https://meta.discourse.org/t/canonical-structure-for-u-causing-many-urls-to-be-indexed/226237 "2022-05-05T15:58:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![stance455](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stance455/32/255345_2.png) [@stance455](https://meta.discourse.org/u/stance455)\
**Post date:** [May 5, 2022, 3:58pm UTC](https://meta.discourse.org/t/canonical-structure-for-u-causing-many-urls-to-be-indexed/226237/1 "2022-05-05T15:58:00Z")

</div>

Initially, I wrote this for the “Bug” category …

… but don’t let me stop you if anyone feels this should warrant a PR or commit 🤞

I’ve been studying the Discourse canonical structure pretty hard the past 2 months and overall it’s great.

Weird URLs with things like `no_definitions=true` or `/search?q=` give the correct canonical.

This all works when serving the JS version of the site to users and crawlers alike.

But it seems `/u/*` urls were overlooked - they have canonicals, but to URLs that are causing thousands of extra urls to be indexed by google.

**The job:**

I’d like all the urls after the users name to canonical to the main user profile page

So `/u/FlyNumber` is the main profile page

The following would have a canonical to the above ( instead of what happens now, which is a canonical to itself)

```plaintext
/u/FlyNumber/summary
/u/FlyNumber/activity
/u/FlyNumber/activity/topics
/u/FlyNumber/activity/replies
/u/FlyNumber/activity/likes-given
/u/FlyNumber/badges

```

---

_[View the full topic](https://meta.discourse.org/t/canonical-structure-for-u-causing-many-urls-to-be-indexed/226237)._
