Tag Info

New answers tagged

1

I'd be careful using 301 Moved Permanently if the original URIs are still valid. You risk search engines will unindex them and reindex your site with the redirected URIs only. I'd rather consider 302 Found or the 307 Temporary Redirect (These are HTTP 1.1). After all that's what you're doing - redirecting this current user temporarily as he requests another ...


0

Create a sitemap for the old website and submit it to Google. In that way the GoogleBot is forced to visit the content of your site and update the index accordingly. It will then find your 301s or your 404s and remove them in due course of time.


2

Using change address in Google webmasters should reflect this. Also have you submitted the new sitemap XML from the new domain. Lastly I would try doing a Fetch as Google from the new domain. Full details present here https://support.google.com/webmasters/answer/83105?hl=en


0

In your case, the 301 redirects are keeping the original domain alive as far a Google is concerned. If you want it to be dropped from the index, then you have to remove the 301 redirects. However, I do make this warning. Anyone who is referencing the old domain will receive an error if you remove the redirects. The 301 redirects allowed anyone with the old ...


0

Is redirecting only to URLs that start with "/" sufficient validation? If you are passing the URL to redirect to as a URL parameter then you still need to validate (or at least sanitize) it as much as possible. Remove any strange characters, strip (or validate) the query string, etc. You should also be constructing an absolute URL for your Location: ...


2

You need to change your Redirect (mod_alias) to RewriteRule (mod_rewrite). Something like: RewriteRule ^word1/word2/word3 /word1/word2 [R=301,L] (Put back example/ if you wish, but it looked like a typo to me?) The problem you are experiencing is that mod_rewrite (nearly) always executes before mod_alias, regardless of the order of directives in your ...


0

The solution was provided on serverfault Your rule is correct. The problem you're having is because you're on a shared hosting plan at Godaddy.com. Putting the IP in here returns: Found 696 domains hosted on the same web server as 184.168.27.44 Since you're not the only site hosted on that IP, when a browser comes to the IP directly, the server ...


0

If I were you, after going live with your new site, I would change links from client sites to your new site. If you just apply a 301 redirect from your old site and that's all, you lose a little bit SEO value. For anchor text of these links, the best option would be to choose your brand name. No matters if all anchor texts are the same if it refers to your ...


0

I haven't found a way to put in a rewrite rule that puts all your virtual hosts into maintenance mode. Here are some other possible approaches: From How to disable all apache virtual hosts?, Vinko Vrsalovic suggests using a single command to disable all your virtual hosts: find /etc/apache2/sites-enabled/ -type l -exec rm -i "{}" \; You would then ...


0

I am assuming that you are, in effect, abandoning the old domain whether the old domain disappears or not, I am assuming that you prefer the new domain over the old domain. I am working with this assumption. I am always in favor of taking a bit of pain to create a clean site/scenario. Otherwise you end up with compromises that complicate things for the ...


1

Here you go.... this should work: <rule name="IE8FacePalm" stopProcessing="true"> <match url="\" ignoreCase="true" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"> <add input="{HTTP_USER_AGENT}" pattern="MSIE 8.0" /> </conditions> <action type="Redirect" url="http://x.com/a-url" ...


2

You could do it in the PHP itself <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.domain.com/course/view.php?id=2&section=1"); ?> You could do it with mod_rewrite RewriteEngine On RewriteCond %{QUERY_STRING} ^id=2$ RewriteRule ^/?course/view\.php$ http://www.domain.com/course/view.php?id=2&section=1 [L,R=301]


2

In .htaccess: RewriteEngine On RewriteCond %{QUERY_STRING} =id=2 RewriteRule ^course/view\.php /course/view.php?section=1 [R=301,QSA,L] If the query string matches exactly id=2 then externally redirect. The QSA flag combines the original query string with the new one, so the resulting URL is actually ?section=1&id=2 - but the order should not matter. ...


0

I would not worry too much. Often people are concerned that Google will penalize them for stuff that they should be able to do. You are fine. Google will figure things out okay. In fact, I am not not sure I would wait as much as a month, but if you want to be cautious, a month should be a good period of time. I would make sure, if you can, to deliver a 410 ...


2

I am going to assume you mean that any request for example.com/page.html outputs the content of the file from websitedirectory/page.html. If it was "redirected" then the browser would show the subfolder in the URL. In your case, there is no effect on SEO. Search engines will see the same URLs you see in your browser and won't know about the subdirectory ...


1

Maybe this link (how to redirect domain according to country IP address) can help you. I think, however, that this is not a good practice. Redirection by language or country is quite strict. It is better preferred: A message at the top of your site that influence the visitor to go to the page built with his language. A system that can easily change the ...


2

If you see a totally different website, and your site is on shared hosting, it may be the case that your hoster has a configuration problem. This was the case in a similar question: "https://" refers to random site, "http://" is broken, but "http://www" works Check if your and the other site are hosted by the same provider ...


1

As you say you are directed to a compromising website, I would check that your site hasnt been hacked in some way with a unwanted redirection to the said website.


0

If you are changing the URL, you can copy all the page information that you want from one to the other, but to update crawlers, bookmarks and the like, you have to indicate a proper redirection. A 301 redirection is not necessarily bad, is not just that some of the "juice" from the original is going to pass to the new one, but also the preferred way to ...


5

No, you do not need a separate registration. http:// or https:// are just protocol specifiers. The name will resolve to the same host. However, once you're on the hosted machine, the web server determines what to display. Often, HTTP (port 80) and HTTPS (port 443) can be routed to different pages. This should be configurable by the website admin/tools. In ...


1

CloudFlare has an awesome feature that automatically injects the user's country into the request headers (and this works even on their free plan). You could then easily use a server side redirect to direct the visitor to the appropriate URL based on this header. I've been running CloudFlare on top of our site for a while and am loving it so far. ...


0

It depends on what sort of "no root page" you've got. My personal website originally returned "404" for / (and common variations such as /index.html or /index.php). Google had no trouble finding things using inbound links to actual pages, but the Cuil crawler couldn't handle it: I'd see a request for whichever inbound link it was following, a request for ...


3

From an SEO point of view, no, it's not a problem for your page to have no root. Search engine's index URLs, it doesn't matter if they're in subfolders or not. However, from a user-experience point of view you really shouldn't assume that anybody who lands on the root of your site wants to see the English version. Let's say a Japanese user tells one of ...


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.


2

Finally resolved using these rewrite rules: RewriteEngine on RewriteCond %{HTTP_HOST} ^www.unwanteddomain.com$ [NC] RewriteRule .* http://whateverPlaceYouWantToSend.com [R,L] HTTP_REFERER did not work so I used HTTP_HOST.


0

You can still accomplish this with 2 domains, like this: domainA.com will open xxx.xxx.xxx.xxx/owncloud domainB.com will open xxx.xxx.xxx.xxx/homepage For this, you point both domains to xxx.xxx.xxx.xxx IP and then configure your web server to support 2 different vhosts and point each configuration to use webroot of where owncloud and homepage folders ...


1

The way I would do this is block all requests which are coming from unwantedcomain.com by checking for HTTP_REFERER Block traffic from a single domain: RewriteEngine on RewriteCond %{HTTP_REFERER} unwateddomain\.com [NC] RewriteRule .* - [F] Block traffic from multiple domains: RewriteEngine on RewriteCond %{HTTP_REFERER} unwanteddomain\.com [NC,OR] ...



Top 50 recent answers are included