Tag Info

Hot answers tagged

27

Why 410 gone? Since the page once existed the correct header status return would be 410 gone, this will inform Google and other search engines to drop the page from its index. You should avoid using status 400 bad request since this implies the server did not understand the request due to malformed syntax. Using undesirable status codes will populate your ...


14

Officially, yes. Any 4xx status may be interpreted as 400; the same goes for the other status groups. (E.g. a 503 service unavailable error may be interpreted as a 500 internal server error.) The RFC is written this way to allow for implementations that may not support every status, and also to allow additional status codes to be defined without breaking ...


10

Spaces in URLs should be encoded. That would eliminate foo abc.jpg as the canonical. Here is a question that addresses how the space should be encoded: In a URL, should spaces be encoded using %20 or +? Spaces may only be encoded as a + in the query string portion of the URL, so that eliminates the foo+abc.jpg as the canonical. Your canonical URL ...


3

The main reason for using "URL slugs" is usability. Making the URL readable and easier to remember (and perhaps help click through rates in the SERPs). However, as you fear, a long URL lessons usability. (If it's too long it's not going to show in the SERPs anyway.) But how long is too long? This could depend on the subject matter and the range of ...


3

Is punctuation perfectly acceptable in the middle of a query string? Yes, but it depends on the punctuation. RFC 3986 Section 3.4 defines what characters are permitted in the query string part of the URL: query = *( pchar / "/" / "?" ) pchar = unreserved / pct-encoded / sub-delims / ":" / "@" unreserved = ALPHA / DIGIT / "-" / "." / "_" / ...


2

You do not want your XML sitemap to include duplicate content. In your case, it sounds like that one product exists at multiple URLs, which is the very definition of duplicate content. So, what I'd say is that you want to have the page mywebsite.com/product1 (the canonical version of the URL) in your XML sitemap, then keep the others out of your XML sitemap. ...


2

First off the easiest one for www is this. RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^yourwebsite\.com$ [NC] RewriteRule ^(.*)$ http://www.yourwebsite.com/$1 [R=301,L] Now for some actual rewriting you should be able to use something like this. RewriteCond $1 !^(users) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ...


2

There's nothing to worry about here, since http://example.com and http://example.com/ are the same URL. The useragent has to include a path in the HTTP request (as per RFC 2616), so what it sends to the server will be GET / in either case. If you add the verbose flag to CURL this is quite easy to verify: $ curl -v http://example.com * Rebuilt URL to: ...


2

You want to do a blanket redirect from one domain to another. Assuming Apache, put in your .htaccess file in the root directory of example0.com: RewriteEngine on RewriteRule ^(.*)$ http://www.example1.com/$1 [L,R=301] This will redirect all requests from 0 to 1 and keep the original request URI.


2

On an apache server with mod_rewrite installed, you can add this code to your httpd.conf (main apache configuration file) and restart apache gracefully. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} ^(.*)/$ [NC] RewriteRule ^(.*)$ %1 [NC,R=301,L] It will redirect all URL requests ending ...


2

What I want to do is detect the language of the browser in my PHP-script and serve the different versions based on that (there will probably be a button to switch the language as well). However, with that approach, both versions of the same page would share one URL (e.g. example.com/about would show either versions of the page, depending on the user's ...


2

If you "dynamically add that meta tag" for only the first URL then it will not affect indexing of the second. Whilst it might be the same file (product.aspx) that processes both requests, they are two different URLs.


1

You want to keep URLs as short and simple as you can. Short URLs are easier to write down on paper and easier to type in as well. This URL... http://www.example.com/subject/history_a/nationalism-israel-other-nations/characteristics-nationalism-national-movements-europe-19th-century/12 ...is probably the 3rd longest URL I have ever seen. The best thing ...


1

Malformed request doesn't mean "a URL you don't have a resource for". It means malformed request. HTTP 400 is definitely wrong here. HTTP 410 works well as it indicates that a previously accessible resource no longer is. Your alternative, as others have mentioned, would be a 404.


1

Yes you are correct though it is not because of the combination of /?. Before going into further detail it is worth noting that for it to be a valid URL there should be a maximum of one question mark (?) since this is a special character signifying the start of the query string. If you wish to have a question mark within your query string data then it must ...


1

Here's a link to check trademarks in the UK... https://www.gov.uk/search-for-trademark This link allows you to search directly with the UK Intellectual Property Office who are charged with the responsibility of maintaining all requests for trademarking within the UK. If it is not listed on here, it is unlikely to be a registered trademark, at least in the ...


1

Potentially, having the the same resource accessible on multiple URLs (ie. multiple slashes) is duplicate content. However, whether this is really a duplicate content problem is another matter. For it to be a "problem" the search engines need to be finding references of these URLs before it is going to start crawling them. And it's likely to need a ...


1

There are several questions to answer here: What's the best way for me to take care of this situation and avoid wasting Google's crawl budget and also let my pages get the most of the weight from authority pages? As you say the parameters do not create millions of new URLs. So it would be okay to let Google crawl them. Your Canonicals do the rest of ...


1

The best way to go about it is to transfer the files in the group folder at mysite.com to the document root folder at mysitegroup.org and make one of the HTML producing files by the name starting with index so that its executed. For example, make sure one file is index.htm or index.html or if you're using something like wordpress or another content ...



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