Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7773819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:13:22+00:00 2026-06-01T17:13:22+00:00

I was going to ask this on Meta but I think it’s a general

  • 0

I was going to ask this on Meta but I think it’s a general enough question to warrant a place here instead.

I’m interested in knowing some of the ways you manage permalinks in your site, specifically permalinks that are built from data that can change over time.

StackOverflow is a good example of this whereby the URL to a question is partly made up from the question title. Without posting a dud question to test I’m unsure whether the link to the question changes if the title of the question changes. My guess is that it doesn’t and if it does, a canonical is likely retained to the origional url.

Changing the title on SO does not change the url

Given that as the case is it common practice to store permalinks against posts in your database? and if so, how much of the permalink would you store?

I ask the latter because there’s only one part of the URL that’s variable in the context of SO, and that’s the question title. So should we store only the sanitized title and build up the rest based on the static information we have from the post, or should we store the whole url including the controller name and Id (etc.)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:13:23+00:00Added an answer on June 1, 2026 at 5:13 pm

    I think it’s relatively common to store the permalink in the database. Space is cheap and string parsing functions can be expensive (making a question title HTTP friendly a few thousand times across thousands of questions will eat some processor) each time you want to display the link.

    As for how much to store, personally, I would only store the HTTP friendly version of your question/post title in the DB (along with a primary key) for the following reasons.

    1. Storing the entire or even part of the URL that concerns itself with Actions and Controllers will make it really, really hard to refactor/rename those things down the road. You would either need to run mass DB updates or custom URL rewrites, etc.

    2. Only storing the friendly version of the title allows you to use it in other places. Let’s take this URL to this question for example, it was probably generated by @Html.ActionLink(Question.Title, "Index", new {controller = "Questions", Id = Question.Id, Slug = Question.Slug}). Keeping the slug as a separate parameter, you can use the questionId and questionSlug parameters in other controller/action calls and keep your URLs pretty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is kind of a shot-in-the-dark question, but I'm going to ask it anyway
I'm going to ask this question again,I thought I had figured it out but
I'm going to preface with: I hope I can ask this question here, because
I am going to ask you this question here since I cannot find answer
I expect this might get some downvotes / closevotes but I'm going to ask
I am going to ask a VERY general question. I was working on a
I was going to ask this on superuser.com but there were only 5 perforce
I almost didn't dare to ask this question because it looks trivial but after
I'm going to re-ask this question in a slightly different way. Say I have
I'm going to ask and answer this question because it took me forever to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.