Tag Info

Hot answers tagged

26

There are several reasons to remove extensions from URLs: To make the URLs look cleaner To make URLs easier to type To make URLs easier to remember To make URLs more SEO keyword friendly To be able to change technologies -- if you ever want to move your site from one technology to the other, its easiest to do so without users even knowing if there are no ...


9

The first one is preferred. This is because it is interpreted as document, whereas the second one is interpreted as document up to product, and as query arguments later on. So search-engine wise, there is no difference between http://www.example.com/product?123/subpage/456 and http://www.example.com/product?p1=123&p3=456&p2=subpage it is only ...


9

According to Kurt himself, it was basically just cuz. And I'd personally question whether search engines consider URLs' file extensions as "words" for search purposes, though I'm not sure I've run across definitive evidence either way on that.


6

All web servers have one or more "default files". It's the file that will be displayed whenever a visitor goes to a URL that ends in a slash /, i.e. a folder. If the default file name on your web server is index.php and a visitor goes to www.example.com/pagename/, they are actually accessing www.example.com/pagename/index.php. If there is no trailing /, ...


5

You need to add the following line into your .htaccess file(s): Options +MultiViews The effect of MultiViews is as follows: if the server receives a request for /some/dir/foo, if /some/dir has MultiViews enabled, and /some/dir/foo does not exist, then the server reads the directory looking for files named foo.*, and effectively fakes up a ...


5

Slightly off-topic but I try anyhow: When I encounter URLs like http://www.example.com/product/123/subpage/456.html I always think that this is an attempt on creating meaningful hierarchical URLs which, however, is not entirely hierarchical. What I mean is, you should be able to slice off one level at a time. In the above, the URL has two violations on this ...


4

Is it better to not have ':' or ',' in the URL for SEO? Although colons and commas are reserved characters, they shouldn't impact SEO directly since they'll be URL encoded by browsers and bots. The second URL would be much more familiar and easier to read for search engine users though, as apparent in links and search engine snippets, so would ...


4

Sure it will work, You can consider any of the one link as canonical parent (Means original). and other one as duplicate. If the url is different in parameter or its order is not an issue. You can just point one url as its original, SEO Crawlers will identify that. something like <link href="http://shoes.com/compare/adidas/vs/nike/" rel="canonical" ...


4

Setting up a URL shortener isn't really that hard if it is for your use only. In order to integrate with with Twitter and WordPress you will have to develop you own API and plugins and that is the difficult or at least time consuming part. I think the basic steps would be. Buy a short URL and get hosting for it. Create a redirection engine in the ...


3

You don't want to replace a slash with an underscore. Google views slashes as word separators but underscores are parts of words. See http://www.mattcutts.com/blog/dashes-vs-underscores/ When slashes represent physical directories on the webserver, many slashes in a URL indicate that the file is stored many folders deep on the server. This often means ...


3

This is the type of “cool” URI scheme that I aim for on my own personal website. Personally, the reason that I started to do so (and probably many more web designer/developers too!) was after reading the article “Cool URIs don't change” – this document was written by the World Wide Web's founding father, Tim Berners-Lee. In Tim Berners-Lee's famous ...


3

Should I care about those non-user friendly links already in the index and hope that Google will correct itself soon? This depends on what you want search engine users to see in your search results: the clean URLs: example.com/1234 or URLs with parameters: example.com/page.php?id=1234 Clean URLs are generally more understandable and recognizable to ...


3

See Webmaster Tools: Updates to Search queries, Parameter handling and Messages at the Google Webmaster Central blog for instructions to suppress the PHPSESSID parameter in search results. On the server-side, you should look into a way to prevent every hit from creating a session - session management is expensive server-side and it is generally undesirable ...


3

It looks like your current URL paths are of the form /category/redundant-descriptive-title/id, where only the category and id parts are actually needed to identify the content. (For example, I can link to http://www.soundplaza.co.uk/speakers/blah-blah-who-reads-this-anyway/10 and see the exact same content as on the page you linked in your question.) I ...


2

It is OK. Consider two things: use the all+active filters as defaults. that way you can omit them. use breadcrumbs rich snippet so in search engines results pages (SERPs) the URL will be structured to represent the actual hierarchy.


2

Page depth has less to do with site hierarchy, and more to do with how many clicks it takes the user to get to their desired destination. If it takes 1 click to go from yoursite.com to yoursite.com/this/that/everything/else/ then technically that's only 1 page deep. I wouldn't tinker with the small stuff like this, as it will likely return little if any ...


2

One more thing to think about is something like bit.ly Pro. You can have your own domain, but with all the speed and analytics from bit.ly. I know that it's still relying on someone else's service, but bit.ly is probably the biggest provider on the web so if they went down, a hell of a lot of people's links would break


2

Remember, there's ALOT more to seo than the URL. If you have 'apple' in there and it's a relative term, great, you have a SEO friendly URL in my opinion. Ideally, your whole URL would be relevant. What does '123' correspond too? It might be worth displaying what it references (for example 'foods') in the URL instead of the number, but ONLY if it is of ...


1

Provided you are happy with pretty URL's that do not end in / but have no file extensions shown such as .php, for example: http://subdomain.domain.com/DynamicCountry/DynamicName/file then you could try this solution. Add these lines of code in your http://subdomain.domain.com/.htaccess file: RewriteEngine on RewriteRule ...


1

I agree with the other answer but would like to add one suggestion. Having gone through a similar situation, my suggestion is that you ask yourself if it's worth the effort to change a lot of urls or just a small number of the most important ones. Go to Google and do a search. The keywords in the results will be bolded in three spots -- the title, the url ...


1

Having short clean URLs can help a very small amount with SEO. That is because users tend to click on them more when they are displayed in the SERPs. The more complicated the URL the fewer people click. The magnitude of this effect is small enough that it isn't worth worrying about if there is a technical reason that your URLs need to end like that. Your ...


1

The reasons for using clean URLs include: They make it easier for users to identify in search engine results and links on websites as to where they would be sent to if clicked on. They make links in search engines and websites appear more relevant to the content that they're interested in, versus a filename or query parameters, and thus users will be more ...


1

As stated in the specification Google adopted here: Traditionally, hash fragments (that is, everything after # in the URL) have been used to indicate one portion of a static HTML document. ...hash fragments are not part of HTTP requests (and as a result they are not sent to the server) Since hash fragments are used to identify a portion of HTML ...


1

I completely agree to all the answers put above. Just adding that one of the reasons why extensions are hidden in URL is to security. Putting it simply, if you don't expose the extension in the URL, it is little hard to figure out the technology on which the application has been built. So lets say a page in made in PHP and the extension is not hidden, then a ...


1

Try this in your root's .htaccess: RewriteEngine on RewriteRule ^[^/]+/(\d+)$ records.php?id=$1 [QSA] http://example.com/foo-bar/42 will be rewritten to http://example.com/records.php?id=42 It wont affect URLs like contact.php, since it does not match ^[^/]+/(\d+)$


1

Try adding CHttpSession::setUseTransparentSessionID(true) (api) somewhere in your Yii app, if it doesn't already exist. I don't like visible session IDs either (triggers the flashbacks of PHP3 vs. broken IE cookies), so I always set it. I'm not 100% sure it'll fix the issue, but I haven't seen any session IDs sneak into search results for the few Yii apps ...


1

I usually use http://www.example.com/product/123/subpage/456. In my case, I've been better off using this kind of URL rather than URLs with parameters. It's your decision tough... Also, using htaccess (if you're using Apache) you can get the rewriting of the pages quite easily.



Only top voted, non community-wiki answers of a minimum length are eligible