Hot answers tagged redirects
5
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] ...
5
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 ...
5
I'm not certain but I don't think what you suggest will have any negative impact (with 1 caveat) given that you are suggesting using 301 redirects.
The caveat is the age of the domain. Domain age plays a part in Google "trusting" your pages. I have never done a test to see whether a 301 redirect will take this into account if you are directing an old domain ...
5
First of all, as you're mentioned the reason to change that are cookies - there's no need - see "sub-domain cookies, sent in a parent domain request" on Stackoverflow:
The leading dot in the domain value .example.com means example.com and its sub-domains. Without the leading dot, the cookie is only valid for this specific domain.
Note that when ...
4
Look for 301 redirection rules in your .htaccess or in httpd.conf.
In httpd.conf look for a rule like this one:
< VirtualHost www.domain.com >
Redirect 301 / http://domain.com/
< /VirtualHost >
In .htaccess look for a rule that looks like:
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule (.*) http://domain.com%{REQUEST_URI} ...
4
You could rewrite URLs internally in your root .htaccess file.
RewriteEngine On
#if request is mydomain.com/something OR
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [OR]
# or www.mydomain.com/something
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$
# but not mydomain.com/blog
RewriteCond %{REQUEST_URI} !^/blog/
#change it to mydomain.com/blog/something
...
4
It's done primarily for tracking purposes, and the format you describe is normally seen when the link is on a site like Faceebook or Twitter - i.e. the owner of http://www.example.com.
Without this redirection they'd have no way of tracking links so the owner of http://www.example.com uses this format to see where outgoing links end up. Reasons why you want ...
4
I have never tried to use a DN-Server for redirecting according to user location.
Important questions to be asked:
Do we talk about country-specific contents or language-specific contents?
Do you have two different sites - and you want to redirect users, that access a computer on french territory and type "mysite.com" to "mysite.fr"? Or do we talk about ...
4
You can use a single rule to redirect the entire site. Both of the following methods will redirect the following urls properly
http://www.example.com/ -> http://example.com/
http://www.example.com/page.html -> http://example.com/page.html
http://www.example.com/directory/page.html -> http://example.com/directory/page.html
If you have access to ...
3
Since you're not answering about the web server running on both server, I will give you 2 options:
on the web server level
on the client level
Web Server Level
If the web server is Apache, you can use the module mod_proxy in particular the proxy pass directive. Just add this conf on the distance.school.com and it will fullfill your request:
...
3
There's no intrinsic reason for either www or non-www (or http/https) to perform better than the other. The issue, usually, is content duplication arising from a site being accessible on both.
WWW non-WWW
For instance, if you site resolves on both http://thomas.com and http://www.thomas.com, then a search engine could index both versions, people can share ...
3
The 301 redirect should be doing this already. You should verify that the 301 redirect is being sent out especially to googlebot.
Another way to do this is to use canonical URLs to tell Google which URL they should display in their search results.
3
In your Apache configuration file, find a line with 'DocumentRoot' and modify accordingly.
EDIT:
Regarding your comment, then you're looking for this:
DocumentRoot httpdocs/public/
Though for the virtual-hosts request,
<VirtualHost *:80>
ServerAdmin webmaster@sitename.com
ServerName www.sitename.com
DocumentRoot ...
3
One possibility is anonymizing/hiding the links. Not everybody cares to show up in referer listings.
If the redirect URL is on the same domain, some sites also use this kind of setup in order to show an intermediate page telling you you're leaving their site. This is sometimes due to legal demands and they'll include disclaimers they're not responsible for ...
3
Tracking is often the reason why links are redirected this way. Another reason that is common is to make implementing referral links easier. For example, if you can get a commission from a retailer using a referral link, you'll want to replace this link with the referral link before the user lands on their website. Suppose in 6 months time you want to change ...
3
While Will is correct that the retry-after value is optional, I'd suggest setting it anyway as a matter of practice. Setting the value has the benefit of being unambiguous.
A 503 without retry-after "should be handled as a 500." If any crawler/script/etc. requesting the documents has been configured to treat 500 differently, then you can't be entirely ...
3
You may have a lower ranking for a short time, but since the process is also going to be slow, I don't think that you will have any real problem.
Also, remember to keep your users up to date, tell them that a change is coming, send them notifications when a new article (or 5) has been moved to the new site, that way, you keep pumping visits and that helps ...
3
It is most likely causing an infinite loop as they are the same. The default pages in Apache are index.html and index.htm.
If the browser does not request a file name the web server will return one of those files if it finds them.
So When you go to http://domain-name.com you are actually viewing http://domain-name.com/index.html just without /index.html
3
This should do the trick:
header("HTTP/1.0 302 Moved Temporarily");
header("Location: example.com/whatever");
header("Cache-Control: private");
header("Vary: User-Agent, Accept-Encoding");
exit;
The recommendation for the Vary header is from this google developer page about optimizing caches (and problems with some IE < 9). Background on caching ...
3
Try using .htaccess!
# Turn on mod_rewrite
RewriteEngine On
# If not your IP address
RewriteCond %{REMOTE_ADDR} !^**\.**\.**\.**
# and not the temporary page
RewriteCond %{REQUEST_URI} !^/maintenance\.
# redirect to temporary page
RewriteRule /*$ /maintenance.php [L]
I think the above might help you a whole bunch!
3
With mod_alias activated, you can do that with the Redirect directive:
Redirect 404 /1234/page/
Redirect expects usually the target as 3rd argument, leaving it brings up the configured ErrorDocument. If a target is added it would result in an internal error.
As can be read in the docs:
If the status is between 300 and 399, the URL argument must be ...
2
There was an experiment done in 2007 on a forum, and the conclusion was that, no, the penalty is not forwarded. However, I'm not sure how reliable that is, and Google might have changes it's algorithms since then.
Here's another account from 2011, and from what I can understand is that this person cloned the banned site, and the redirected the original to a ...
2
1) Why would you use RedirectMatch directive (from mod_alias) when you already have more powerful RewriteRule directives (mod_rewrite) in place? Why mix them up?
2) In any case -- your RedirectMatch rule will never be executed, since WordPress rules, the way how they done, will intercept all requests (unless, of course, if you really have /en/ folder).
You ...
2
First, I'd look at your URL settings (under "permalinks") to see why these URLs are being produced in the first place. I don't think they are by default. Ideally, you can just stop this from happening.
Second, is your site offering links to these unwanted duplicates? If so, I'd advise preventing that. If they're not linked to, users and search engines ...
2
GoDaddy has a service for parked domains, I'm sure other registrars have similar services too, but basically it's just a simple single page website, perhaps with some contact information so you could sell your domain... you can make one webpage for all your parked domains and redirect all of them to this page.
Redirecting shouldn't be a problem, right?
2
Well, I'm going to stick my neck out and say it's impossible to determine, with a degree of accuracy, the difference between an incoming link and a redirect, or to specifically determine whether it was a redirect and not some other kind of request.
As far as the target website is concerned, it receives the same HTTP request whether it is as a result of a ...
2
There is no guarantee, but this should help to reindex your site...
In Google Webmaster Tools under "Health > Fetch as Google", fetch the homepage of your site. Once this is complete there will be a Submit to index button next to the URL. Click the button and select "URL and all linked pages".
Internally I redirect in ASP.NET
If this is an external ...
2
If you have not connected all your domains to your GAE app. in that case you can use redirecting options offered by your domain host.
GAE is just like any other web hosting, if you have connected each of your domains to an app, you can use a simple HTTP redirect, preferably a "301 moved permanently", to do this, you need to have an HTML index/landing page ...
2
The short answer is yes. Google will penalise a site for duplicate content. It depends on who Google thinks is the authoritative site for the content. My advice is to quickly put redirect rules in the old site to redirect content (301 permanent redirects) so that GoogleBot easily understands that the content has migrated.
Only top voted, non community-wiki answers of a minimum length are eligible
