# Issue with category links in no JS mode

**URL:** <https://meta.discourse.org/t/issue-with-category-links-in-no-js-mode/23716>\
**Category:** Bug\
**Created:** [Janeiro 6, 2015, 11:47pm UTC](https://meta.discourse.org/t/issue-with-category-links-in-no-js-mode/23716 "2015-01-06T23:47:29Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Mooash](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mooash/32/189167_2.png) [@Mooash](https://meta.discourse.org/u/Mooash)\
**Post date:** [Janeiro 6, 2015, 11:47pm UTC](https://meta.discourse.org/t/issue-with-category-links-in-no-js-mode/23716/1 "2015-01-06T23:47:30Z")

</div>

If you view a Discourse instance with the Googlebot Useragent so that Discourse prints the instance without JS at the top of a topic it gives a link back to the category in the format `http://example.com/category/category_name`

This link then redirects to back to the shorter version, `http://example.com/c/category_name`

The issue is if the above category is a subcategory, that second link is a 404, it should be linking to the correct location, ie `http://example.com/c/parent_category/category_name`

This issue doesn’t appear when you have JS enabled/aren’t the Googlebot.

Happy to give and info if wanted! You CAN repeat this on [https://meta.discourse.org](https://meta.discourse.org) by using [this](https://meta.discourse.org/t/category-definition-for-wordpress/12282) post for example and CURLing the URL it gives back to the category listing.

```plaintext
macbook-air:~ $ curl -IL https://meta.discourse.org/category/wordpress
HTTP/1.1 302 Found
Server: nginx
Date: Tue, 06 Jan 2015 23:46:22 GMT
Content-Type: text/html; charset=utf-8
Status: 302 Found
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Location: https://meta.discourse.org/c/wordpress
Set-Cookie: destination_url=https%3A%2F%2Fmeta.discourse.org%2Fcategory%2Fwordpress; path=/; Secure
Set-Cookie: _forum_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTZmNWI0ZDRmN2VjMjgwYjcxZDUwYWU1YzBmM2YwOTMwBjsAVA%3D%3D--eec8fe7c8eff16a59a7b780f2f23311498727b2b; path=/; HttpOnly; Secure
X-Request-Id: 4ab71e35-9a4f-4bdf-a9f9-b345f42dfb0a
X-Runtime: 0.019158
X-UA-Compatible: IE=edge
Strict-Transport-Security: max-age=31415926

HTTP/1.1 404 Not Found
Server: nginx
Date: Tue, 06 Jan 2015 23:46:22 GMT
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Status: 404 Not Found
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Set-Cookie: destination_url=https%3A%2F%2Fmeta.discourse.org%2Fc%2Fwordpress; path=/; Secure
Set-Cookie: _forum_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJThhZTRiNmI3ZTkyNDVmMmE5MjYxNzE1OWNlZmJiNzQyBjsAVA%3D%3D--8c98906a8920b80c989a0cf916802b677fea4ed6; path=/; HttpOnly; Secure
X-Request-Id: 4869fed5-535c-4253-a440-4c4f72da1147
X-Runtime: 0.090909
Strict-Transport-Security: max-age=31415926

macbook-air:~ $

```

---

_[View the full topic](https://meta.discourse.org/t/issue-with-category-links-in-no-js-mode/23716)._
