Tag Info

Hot answers tagged

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.


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

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

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


4

Use RewriteLog and RewriteLogLevel directives to log such activity (IIS restart most likely will be required). The higher value you put for RewriteLogLevel the more verbose/detailed it will be. If your site is busy (has lots of requests) then you will have hard times debugging it (log will become huge in a matter of seconds/minutes and it will become ...


4

If you can, it's a better idea to put the redirects from the old urls to their new equivalent. For any other pages that have no new equivalent or are being discarded, you can either leave those to be 404, or redirect those to the home page. It's also a good idea to have a custom 404 page for the new version of the site that contains a simplified site map, ...


4

You're almost there. Drop the very first RewriteCond (as it's not required and won't match ever) and add a trailing / to your last RewriteRule since you're redirecting with them. RewriteEngine On RewriteCond %{HTTP:Accept-Language} ^en [NC] RewriteRule ^$ http://mysite.com/en/ [L,R=301] RewriteCond %{HTTP:Accept-Language} ^de [NC] RewriteRule ^$ ...


4

If it truly is a redirect of a new domain (and I say this because a lot of companies get this wrong) then there will only be the root domain indexed in search engines anyhow so when the new website goes live and the redirect removed, it won't take a search engine long to see that and then start indexing the new site on the new domain. There is minimal ...


3

You appear to be targeting the same locale (the same content) with all your domains. In which case you should redirect (301) all domain variations to the canonical mywebsite.org.uk domain. If you don't redirect then you could encounter duplicate content issues if people/bots find and link to the other domains. Google will only return 1 page/URL in a series ...


3

Firstly, you should try and avoid those parameters wherever possible. Don't link to these types of URL yourself. Of course it's often outside your control. If there are certain parameters in the URLs, for example a "ref" parameter that came from a known source (like some advertising or tracking you did) it can be beneficial to redirect to the canonical ...


3

If you wanted to append all the query parameters you would want to use $_SERVER['QUERY_STRING'] to extract them from the current URL, you would then append this to the location of the redirect: header("Location: http://www.New-Website.com?".$_SERVER['QUERY_STRING']); If you only wanted to pass certain variables, you could get them individually and then ...


3

Yes, change them to the new URLs. Although the 301 redirects tell the search engines where to find moved pages you shouldn't be feeding them inaccurate information about your web pages. Besides possibly being error prone, it may also be an indicator of quality. While this may not affect your rankings, it may possibly affect crawl rate and other related ...


3

I guess a 301 redirect is certainly not an option since the whole site structure will be different. But if you are coming from Joomla to WordPress, the site structure will be predictably different and thus 301 redirects are both feasible and desired. As you can see in this other question, it doesn't have to be all that complicated of a rule to ...


3

But we do not want to harm our existing SEO while we are doing this. What you might be concerned here with is Cloaking - that is, serving different content to a user's browser than to search engine robots. Providing that you use IP delivery, which is using the requestor's location to deliver content specifically written for that country, versus ...


3

I think you're reasonably close. However, & (ampersands) are not HTML encoded in the request, so you should check just for & and not &amp;. Special HTML characters should only be HTML encoded in your source HTML document. I think the few omitted spaces (argument delimiters) are perhaps just due to the copy/paste of your code? Try this (in ...


3

I would advise to keep a MySQL table that saves the mapping of the file id, to the directory it is kept in. You shouldn't be worried about the DB load considering 1.5M rows and millions of queries per day. For such a simple 1:1 link query. Just make sure you add the proper index to the key you search according to, and if you wish to be better prepared 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 ...


2

I strongly recommend not to use these redirects just check the user is login or not. Let me explain what a 301 redirect will do: When you use 301 redirect from page 1 to page 2, search engines will pass the value of all all page authority, rankings, and backlinks from page 1 to page 2. In this situation, page 1 will lose its rankings and page 2 will start ...


2

You'll want both in the root of the site, especially robots.txt because that's where Bot's will be looking for it. The Sitemap could go anywhere, but it would make the most sense in your case to put it in the root, rather than having several sitemaps for each additional language you add in the future.


2

You can use the .htaccess file to redirect from IP to domain using this code: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^555\.555\.555\.555 RewriteRule (.*) http://www.example.com/$1 [R=301,L] Change 555.555.555.555 to match the IP of your server, additionally though you can use canonical urls that will prevent duplicates entering ...


2

In your custom 404 page you could check the structure of the URL and 301-redirect if it looks good - or preferably look it up against a known list of previous Wordpress URLs. At least this way you are only doing the lookup/redirect if the page doesn't exist. If you are doing 1000s of redirects with Apache, it will be more efficient/faster to do this in ...


2

As Stephen Ostermiller has pointed out the correct way is to the have a landing page and let users navigate the correct areas of the site. However as you cannot do this, Google have given instructions in the past for redirects based on user location. Here is a video from Matt Cutts on IP detection and redirects. On Googles page for Redirects and ...


2

As it says in the answer to How should I structure my urls for both SEO and localization? You should not use automatic redirects for language purposes based on either the Accept-Language header or on IP address geography. Geo-ip databases are inaccurate. Up to 10% of visitors may be assigned to the incorrect country. Some countries (like Canada) use more ...


2

An alternative fix would be to enforce the trailing slash on the end of your URLS - this would have the benefit of preventing duplicates if your not using Rel Canonical. SOURCE This will redirect all requests without a tailing / to the URL with the slash on the end. (note within the 2nd part of the bracket is those file extensions to ignore.. ...


2

If the page has been deleted then the correct response would be to return a 404/410 status. (and perhaps on a friendly error page, link to similar products) Returning a code other than 404 or 410 for a non-existent page (or redirecting users to another page, such as the homepage, instead of returning a 404) can be problematic. Such pages are called ...


2

I believe I have a solution that will work. As this is a Google Analytics specific problem you can use UTM tagging to adjust the source so that it will not show up as referral, but as direct traffic instead. Simply append the linking URLs with: ?utm_source=direct Please note that the referral data will be removed from showing in GA, but the data will ...


2

It won't do you any good SEO-wise. Search engines are smart enough to follow the redirect so they'll give the final landing page the credit for the link. Even if point #1 we not true, it would be silly to give a redirect page so much link juice and/or any other SEO value. Do you really want that page to rank well? Is that what you want your visitors to ...


2

Search engines respect 301 redirect and it is the most search engine friendly thing you can do in this case. It will tell them the content has moved, to stop indexing the old URL, start indexing the new URL and associate all of the links the old URL had with the new URL. That last part is key as those links hold a lot of SEO value and by not doing the 301 ...


2

Well, if you literally used the following rule: Redirect 302 /username domain.com/?username then it probably tried to redirect you to http://domain.com/domain.com/?username - because you didn't provide an absolute path (with my Apache 2.4.6 this rule even returns an internal server error). The following should work: Redirect 302 /username ...


2

To isolate the problem, first try it without the redirect. If it still doesn't work, then make sure that the httpd user (e.g. nobody) has read access to the GeoIP database files, as covered in the Troubleshooting section here. Also make sure that each line in your .htaccess file or main server config ends in a newline, and remove the spacing before ...



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