Tag Info

Hot answers tagged

27

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 ...


10

You could actually remove .html from the files on your server and set settings in htaccess so that they get served up as html files, but that's probably not what you're looking for. Do this : RewriteEngine on # Check this condition to ensure that it's not a directory. RewriteCond %{REQUEST_FILENAME} !-d # Check this condition to ensure that there's a file ...


10

Personally I would put domain.com on contact cards,etc and have it redirect to www.domain.com. This can be done with a simple rewrite. The reason for this is that my users should never be concerned with having to type www. I absolutely hate sites that require people to type the www - I think it's a completely outdated requirement from years gone by. You ...


10

You've got the basic idea. Inventory your assets, and also identify the pages which receive the most traffic and backlinks (don't forget alternate URLs if the same page is accessible via more than one URL). Identify any content that isn't being directly migrated to the new site; find a corresponding asset on the new site if there is one*; if there isn't, ...


10

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.


10

I get that it conforms to the strict ISO rules, but why? There are different operating systems behind the various servers on the net, and for some of them a directory or file named page is not the same as one named Page. The result is that those really are two different locations and not even necessarily the same type of location(dir/page). The web ...


10

I've been told that .htaccess should be avoided when possible, as it reduces the server performance and new servers disables it or just don't implement it anymore. The part about compatibility is absolutely not true; the part about performance is kinda true but probably irrelevant for you. What the person you quote was probably talking about is that ...


10

Try this RewriteEngine On RewriteBase / RewriteRule ^edit/id/([0-9]+)/?$ edit.php?id=$1 [NC,QSA,L]


10

Yes, the latter one is better. Yet, if applicable, /john-smith is better than /johnsmith


8

No offense intended, but Case Sensitivity is VITAL to urls today - they are used millions of times a day: bit.ly http://bit.ly/ri2LhQ http://bit.ly/ri2LHq Two vastly different sites - only possible because of case sensitivity


7

No, URL rewriting has no positive influence on crawling or indexing; oftentimes it can even have a negative effect. For instance, many websites embed all parameters as well as plain text (eg the "title") in the URL when rewriting them, creating pages with many possible URLs (we often even see session-IDs rewritten in URLs...). We did a blog post on this at ...


7

I do not believe Google says. It used to be true that test_param_1.html was better than index.php?module=test&param=1 but I do not believe that is the case anymore for Google. However, if your 2 examples pages are very similar in content then you will want to use a rel canonical on them so Google knows which one is the master. Otherwise your pagerank ...


7

Search engines do care about case. Capitalization doesn't affect your rankings directly; however, if you have links to a page both in caps and lowercase, the search engine will view it as two distinct pages. You begin to run into duplicate content issues. Depending on your server, example.com/Page1 and example.com/page1 are two different pages, but search ...


7

Search engines don't care about case. Rather than navel gazing about whether you should use mixed case or all lower, work on real search engine optimization, which is creating content that give people a reason to visit your site.


7

Is there any sort of downside for a URL being changeable? Depends. Let's look at your question's URL. Right now the URL is: webmasters.stackexchange.com/questions/5376/seo-and-changeable-urls As you noted, if you change the question's title the URL will change, too, and become: webmasters.stackexchange.com/questions/5376/file-extensions-are-yummy ...


6

...Or more specifically, Struts, and it means "do" as in "perform an action", URLs are usually mapped to the Controllers within an MVC architecture, and "do" is just a convention, any URL can be mapped, having ".do" doesn't do anything special.


6

Remeber that no one from internet can see your directory tree, so stackoverflow.com/ and test.stackoverflow.com are completely diffrent sites for us and search robots. You can do that by checing http host in query. RewriteCond %{HTTP_HOST} ^test RewriteRule robots.txt someotherrobots.txt


6

I think you might have selected the best answer prematurely? Question 1: My pick would be website.com/en/tomato/just-about-tomatos - my rationale being: /en/ is a primary language folder that encompasses all of the content therein so is best suited to appear directly after the domain, and is the best choice for multi-lingual implementation after a) new ...


6

The best way is to use 301 redirects in your .htaccess file, the 301 code signals to google that the url has been permanently redirected. I'd also recommend signing up for Google Webmaster Tools and submitting a sitemap to them, if you haven't already, as this will help them to understand the changes you're making to your site. redirect 301 /old-url ...


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

I'd say stop reading wherever you read that drivel. Dynamic pages are a natural part of the web, very common, and you should definitely want them to be indexed by the search engines. The search engine crawlers regularly crawl pages looking for changed content and, if they detect any, update their indices. That's good for you because it means new content that ...


5

Anytime there is a difference in any part of the URL, even if it is capitalization or parameter order, search engines will view it as a unique URL. A) Yes, they are still different URLs, even if it's the domain. You might find the following code useful for your .htaccess file: #change RewriteBase to / after transfer RewriteBase / #Redirects non-www to ...


5

Google is not going to care what you use for the suffix. Personally I would suggest you use .html simply because it says nothing about your underlying technology platform. Or, be deliberately deceptive and use something like .php on an ASP.NET site. From a security perspective this gives as little information as possible to anyone who might want to hack ...


5

So I wrote a set of Rewrite rules that did what you wanted, but it completely broke my website. I realized that what you want is probably not what you need. Adding trailing slashes to the end of all URLs really messes with the semantics of the URL in that you're no longer accessing the file /foo but the content listing of the directory /foo/. For example: ...


5

I wouldn't so much call it "URL rewriting" so much as "having a sane URL schema". There is a good and bad place for everything. In the example you give, you are absolutely correct; you have an unordered set of 'parameters' as it were, and the key=value&key2=value2&... syntax is excellent for that. However with the date example you give, there is a ...


5

It is best to let them disappear as long as your redirects are 301's. Google will in time see that they are 301(permanent) redirects and will switch over to the new URL. I have done this myself and you should see results within 2-4 weeks, if not faster. If it has been more than a month and your old URLs are still showing up in Google's SERPs then you ...


5

It's a regexp metacharacter that matches the beginning of a string. Since all strings have a beginning, this regexp matches any string. This is a typical nginx idiom for "redirect any URL to http://test.com/". The $ metacharacter matching the end of a string would work as well, but ^ seems to be what everybody uses.


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

Look no further then the URL of this page: http://webmasters.stackexchange.com/questions/16641/seo-urls-best-place-for-the-id It's in the http://www.site.com/action/id/slug-title format. But truthfully, both work well and are optimized for the search engines.



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