Tag Info

Hot answers tagged

14

Strong vote for a dedicated 404 page. Less confusing for the user Allows you to see more easily if something is wrong (through web server error log, your own logging script and/or Google Analytics) You can tailor the page towards the situation (for example display a list of product categories) Allows search engines to clean up their indexes. No longer ...


12

It sounds like what you want is not a redirect but actually a proxy. Check out the information found in the mod_proxy config page. You should end up with something like: ProxyPass /app http://example.com:8080/app ProxyPassReverse /app http://example.com:8080/app


12

While you seem to have solved your problem, you may still experience this same phenomenon going forward. 301 Redirects are Google's recommended way to move content, however they have at least some decaying effect on Page Rank. Google's Matt Cutts was interviewed in March 2010 by Stone Temple Consulting. From the full transcript of his interview: Eric Enge: ...


11

302 redirects aren't bad for SEO as they are probably the most common redirect in use today. In fact, PHP's header() function sends the 302 HTTP response by default. Here's what Matt Cutts had to say about 302 redirects. Basically they are fine and Google will find and index those links properly. It looks like Google will show the original URL instead of or ...


11

The answer when you asked on your original question was: Cookies are split and/or duplicated. SSL doesn't work. Inbound links aren't consistent The main thing to understand is that although www.domain.com and domain.com may display the same site, they don't have to, so are treated as separate sites. In detail Cookies are split and/or duplicated ...


11

According to the current version of the HTTP/1.1 standard, RFC 2616, the value of the Location header must be an absolute URI. However, in the draft standard prepared by the HTTPbis Working Group to eventually replace RFC 2616, this has been changed to allow relative URIs as well, apparently because: "The definition of the Location header [in RFC 2616] ...


10

301 redirects and canonical links are two very different things. A 301 redirect tells the search engine that the page has permanently moved to a new URL and to forward all links, etc, to the new URL. Basically it's a change of address card for web pages. If you change the URL of a page, including the domain name, you would need to do a 301 redirect so the ...


9

I do not know a ton about StumbleUpon but I do know that Google only gives you a slight ding for 301 redirects. So by that measure you should not have an issue with doing a 301 redirect for a page that StumbleUpon is linked to. Google will still crawl it and just see it is now a 301. The only concern I would have is if StumbleUpon removes links that it ...


9

You could make example.com/test.com resolve to the same webserver (IP) via dns (CNAME if you like) and that would work. If you are looking to do this on a per-path basis than no. DNS is ignorant of things like URL. DNS is simply translating the host part of the url (example.com) into IP address. The web server is in charge of figuring out what (or where) ...


9

If the root (/) 301 redirect to /en/, Google will most probably consider your homepage is http://www.example.com/en/ and there is no problem not to have a root (/) page. Regarding Google guidelines for multilingual sites, you can use this method to separate languages on your site.


8

Options: Set up a local site for testing purposes. Something like WAMP should do the trick. If you're going to do the testing on your live server, temporarily block your site while doing your testing. A 307 HTTP response would be appropriate. Use basic authentication to keep crawlers and everybody else out while you do your testing. Since your site will be ...


7

Store your old and new redirect paths in a database. Redirect 404 errors to a special 404 page. With Apache and PHP, you could do this with the ErrorDocument directive in your .htaccess: ErrorDocument 404 /404.php In the 404.php script, get the referring page with $_SERVER['REQUEST_URI'], look up the old URL path in your database, and serve a 301 redirect ...


6

As has been noted, this can not be done entirely with DNS. However, if you have the DNS for example.com refer to the same server as test.com it is very simple to configure Apache to accomplish what you wish to do. Just add the following: <VirtualHost *:80> ServerName example.com Redirect permanent / http://test.com/ </VirtualHost> This ...


6

To my mind, it will make more sense to use 410 gone status code in this case. The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not ...


6

Having multiple domains point to one website is common as a company will buy variations of their main domain name (other TLDs, misspellings) and then point them to their main domain so on the off chance that someone uses one of those variations they still will end up at the company's website. As far as SEO goes having so many domains pointing to one place ...


6

If URL 1 and URL 2 are different, then Google is not simply going to start showing the new URL. You have to let Google know of the change in order for them to update their listings. To do this, you will need to use 301 redirects from the old pages to the new so Google can update their URLs. Assuming you are in a LAMP hosting environment, you need to add one ...


6

With a correctly done 301 redirect, as you've noticed, the referred will be the original referer, not the directed URL (foo.com in your example). You should be able to see the 301 redirects to bar.com in the log files for your foo.com site. If for some reason you can see the log files for your foo.com web server, then you could track them using Google ...


6

So .. you have more than 1 .htaccess file: one in the root folder and one in /dev folder. Where did you put rules from @Alex -- root or /dev .htaccess? Most likely in root. That is the reason why it did not worked. Thing is -- if Apache sees rewrite rules in lower level folder, it will NOT execute them from parent folder UNLESS your lower level .htaccess ...


6

@PeanutsMonkey You didn't really answer John's question. At least it doesn't seem so. You just restated that people end up at a porn site. (Maybe you're just being brief at the cost of clarity.) I'm not sure it's even possible to "take over" an existing TinyURL in the way you're describing. Use LongURL to find out where the tinyurl is really pointing. It'll ...


6

Nginx uses the try_files directive to 'see if something exists and fallback to another option' instead of using if statements and rewrites. Within your server block, create a location block that will match your files (e.g. files ending in jpg, gif, png - add whatever extensions you want). Within that block, you will add your try_files directive. Nginx will ...


6

Section 14.30 of the HTTP 1.1 RFC http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 is not significantly different. I don't know that you're going to see any actual practical limitations for this. The only time I've seen even a warning about this issue is when I used to test in Lynx and the location was not absolute it would warn you "Location ...


6

If the domains are serving duplicate content, or even similar content with minor variations, you run the risk of being penalized for that by the search engines. At least, that's my understanding from all of the articles I've read. Irrespective of that, there are many reasons you should be using the <link rel="canonical" href="..." /> tag in your page ...


5

I figured out my issue. You can use a Google Analytics account to track a domain and if you change the domain name and do a 301 redirect from the old to the new you can use the same Analytics tracking code. Note, the 301 isn't required though. However, Google Webmaster does not work the same. When you switch domain names you will need to add the new ...


5

So it looks to me, based on this question over on StumbleUpon's support site that there's a bit of a downside in terms of one aspect of SU, from a SU employee: Sorry, we can't redirect existing reviews to new urls, nor change the entry details for existing reviews. You may wish to ensure that you have a redirect on each of your "old" pages ...


5

Do not use a JavaScript redirect. That's SEO suicide. Search engines don't handle JavaScript well if they handle it at all. JavaScript redirects also don't use HTTP headers that tell the search engines your page has permanently moved and no association is made between the old homepage and the new one. Not to mention anyone without JavaScript turned on will ...


5

Users first!!! Catering to search engines instead of users is a recipe for failure. Good usability would be to redirect them to a page that explains that the product doesn't exist anymore and invite them to explore other related items. That way you don't lose the visitor due to a bad link or confusion. After all if they are following a link expecting one ...


5

If a piece of content has been intentionally removed from the site, then naturally that page's PR will disappear. That's the appropriate behavior. PR represents votes from other users indicating that they believe that the linked page is valuable. So if the content they voted for has been removed, then naturally their votes should be discarded. Now, you ...


5

Do a 307 temporary redirect on the server side. You can do this with PHP or .htaccess, it doesn't matter which. But definitely make sure you send the 307 header as that is what tells the search engines the redirect is temporary and to try again later. Without it they will consider the pages removed which is exactly what you don't want. PHP: ...


5

Try converting your mod_alias redirects into mod_rewrite directives. Edit: Example below assumes that you have replaced old ASP files with PHP files under the same path. RewriteEngine on # *.asp -> *.php RewriteRule (.*)\.asp$ /$1.php [R=301,L] # tracking script RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ...



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