include the page id in a url on my umbraco site - umbraco

I have a site running on Umbraco 7, that uses the default Url scheme, a url might look like this:
http://domain.com/page-name/subpage-name
As the content creators likes to "optimize" the pages on the website, they often change the page titles, and in the process change the url of the page, breaking all links linking to the page (google links, ad-words campaigns, partner sites ect.)
I would like to keep the page title in the url, for SEO purposes, and not be stuck with one URL when a page was first created, for this i was thinking of adding the id to the url of the page. I have seen many sites have a url that looks like this:
http://domain.com/page/id/subpage-name or http://domain.com/page/id-subpage-name
And then lookup the page based on the id instead of the name
Is it possible to achieve this with Umbraco?

I'd agree with Pekka on this one, it's super easy to create separate field(s) for page header/navigation title/browser title. In my opinion it's a better solution than adding ids to the URL, but that's just my two cents.
You should be able to make a custom URL handler like this: http://24days.in/umbraco/2014/urlprovider-and-contentfinder/ - the article is from 2014, so some stuff may have changed. But the concept should still be relevant.

Related

Why doesn't pmwiki have an ID system like MediaWiki?

Every single site that runs on Mediawiki that I have ever visited has the option of replacing the title of an article with the following phrase in the url:?&curid=[any number]. For example: http://rationalwiki.org/wiki/?&curid=1999, https://en.m.wikipedia.org/w/index.php?&curid=2001
So, since PMWiki is wiki software like MediaWiki and has a url structure that is similar to Mediawiki, why don't pmwiki site urls have any kind of ID system?
In PmWiki, page urls are deduced from page names themselves.
For example, the page MyGroup.MyPage may be reached via either:
http://mywiki/?n=MyGroup.MyPage
http://mywiki/MyGroup/MyPage
(according to wiki's Clean Url configuration)
The SQLite PageStore cookbook recipe (ie. PmWiki's addon), would provide shortened urls.
It also should be noted that page names could remain short, using (:title ...:) markup in the page itself to provide a more detailed title.

If I change my SEO-friendly URLs, how do I tell Google to forget the old ones?

I have an ecommerce site with over 3000 products. Currently, my URLs look like this:
http://www.muszakiarena.hu/termekek/sencor-sle-1958-led-tv/3112
Now, 'termekek' means 'products', the second one is the name of the product, while the 3rd one is the ID of the product.
I want to remove 'termekek' from the URLs, because it is unneccessary and I hope I'll get better rankings without it. So new URLs would look like
http://www.muszakiarena.hu/sencor-sle-1958-led-tv/3112
Now, the system already works this way (the product pages show up at www.muszakiarena.hu/sencor-sle-1958-led-tv/3112), but if I change my product links in the navigation to the new type and ask Google to recrawl, I'm afraid it will detect duplicate content.
How do I tell Google to forget the old URLs and only keep the new ones?
You should redirect (with 301) from the old to the new URLs.
That way all search engines that indexed the pages under the old URLs will learn that the URLs changed as soon as they try to crawl them again. The same goes for users that bookmarked/published the old URLs: when visiting them, they get redirected to the new URL.
If using a 301 redirect is not possible in your case, you can use the canonical link type. (But a 301 redirect is preferable.)

Hide website filenames in URL

I would like to hide the webpage name in the url and only display either the domain name or parts of it.
For example:
I have a website called "MyWebSite". The url is: localhost:8080/mywebsite/welcome.xhtml. I would like to display only the "localhost:8080/mywebsite/".
However if the page is at, for example, localhost:8080/mywebsite/restricted/restricted.xhtml then I would like to display localhost:8080/mywebsite/restricted/.
I believe this can be done in the web.xml file.
I believe that you want URL rewriting. Check out this link: http://en.wikipedia.org/wiki/Rewrite_engine - there are many approaches to URL rewriting, you need to decide what is appropriate for you. Some of the approaches do make use of the web.config file.
You can do this in several ways. The one I see most is to have a "front door" called a rewrite engine that parses the URL dynamically to internally redirect the request, without exposing details about how that might happen as you would see if you used simple query strings, etc. This allows the URL you specify to be digested into a request for a master page with specific content, instead of just looking up a physical page at that location to serve.
The StackExchange sites do this so that you can link to a question in a semi-permanent fashion (and thus can use search engines with crawlers that log these URLs) without them having to have a real page in the file system for every question that's ever been asked (we're up to 9,387,788 questions as of this one).

DotNetNuke URL's After Menu Change

I am not particularly familiar with DotNetNuke, so please correct me if I am using any wrong terminology.
I have a client who has a bunch of links that are hardcoded in an HTML module. The URL's looks like the following:
http://www.siteurl.org/level1/level2/level3/level4/pageName.aspx
So the URL for the page is basically made from how the menu is constructed. When I change any order in the menu, this breaks the hardcoded links. Is there a way to use something like an ID instead for the URL so no matter what my menu looks like, the page will be resolved properly?
You could use an ID for the pages, linking to
http://www.siteurl.org/default.aspx?tabid=## where ## is the ID for each page.
Now the key will be to find the proper IDs which you could do by looking at the HTML source of the Admin/Pages page.
That being said, the proper thing to do, would be to not MOVE or RENAME pages, this breaks all the old URLS (as you're experiencing) as well as those pages/urls in any search indexes.
A better way, though more work, would be to create a new page at the new PATH (where you move things to) and then redirect the old page to the new page (in the page settings). This requires quite a bit of work, but is the best way currently to handle old URLs, I have a video example of this at http://www.dotnetnuke.com/Resources/Video-Library/Viewer/VideoId/213/Renaming-A-Page-In-DotNetNuke-.aspx

Reg. Search engine optimization for my blog

I'm on the way of creating a blog through ASP.NET MVC framework. All the articles I'm going to submit have the same layout only the main content differs. So I created a common view that dynamically loads the content from a physical file(contains only the particular article markup) in a section. So all the url requests send by users points to a same physical file that dynamically loads a particular section based upon the article. Is this the right approach? Is this create some problems in SEO? I'm eager to hear from you. [UPDATED] The urls of the articles look like http://myblog.com/blog/archives/2011/1/using_asp_mvc. All these kind of requests are received by a single page that loads the content of the article from another physical file in it.
I think you need to rewrite the url like in
http://www.cricandcric.com/Cricket-News/4182/Cricket-West-Indies-:-I-am-sure-that-West-Indies-will-bounce-back-,-said-Hooper.html
If you obesrve this I have done the URL Rewriting, which will be user friendly for the search engines.
You can find good references at following url
http://www.webconfs.com/url-rewriting-tool.php
http://corz.org/serv/tricks/htaccess2.php
To make it more understandable about the power of url rewriting
if you search for "I am sure that West Indies will bounce back , said Hooper"
in google, you can see our cricandcric.com in the first page

Resources