: Subdomains vs. URL Path in shareable links I am building a web application for questions and answers. Each question/answer page has all the required metadata for Facebook and Twitter, and we
I am building a web application for questions and answers. Each question/answer page has all the required metadata for Facebook and Twitter, and we encourage users to share these pages.
I have a dilemma regarding the shared link structure:
Option 1 - subdomains
Use a questions.example.com and answers.example.com, followed by an ID and optional text. The text is ignored by the request, which only takes the id into account.
questions.example.com/<question_id>/<question_text> http://questions.example.com/12345/how-long-is-the-queue # Example q.example.com/12345 # Example
Option 2 - URL path
This is the format used by stackoverflow.com and trello.com:
example.com/questions/<question_id>/<question_text> http://example.com/questions12345/how-long-is-the-queue # Example example.com/q/12345 # Example
Server-wise, I can easily do both - I have a wildcard SSL certificate and Apache/NGinx configuration is pretty straightforward.
Which option - subdomains or URL path - is preferred for shareble links?
More posts by @Michele947
1 Comments
Sorted by latest first Latest Oldest Best
Both are fine, but the URL path has a slight benefit over subdomains, because the backlink juice would be concentrated on one domain. Managing one domain is also easier than multiple subdomains.
In all cases, I would put the id of the question/answer in the url, because it will make the url unique for sure.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.