Tag Info

Hot answers tagged

14

Mobile to desktop version should be a choice the user initiates. Sometimes the user may want the mobile version due to: 1) A focused and less cluttered experience 2) Faster browsing for low-bandwidth users (e.g. laptop with a 3G connection) 3) Ability to fit on a small screen Whatever the reason, I don't think deciding for your users is right. Let the ...


12

If your website is down for a month, you will lose all your rankings and it may take you months to gain them back. I had a website go offline for about 3 months due to an issue with hosting. When I got it back online, it took nearly a full year to get back the rankings that it had once enjoyed. The best idea I have to mitigate the damage would be to use ...


10

When your website is too busy due to a large traffic, the best way of redirection is using custom error documents. So, when a user gets 503 error code, the server will redirect visitors to the custom error document page you have defined. There are different ways for different servers to customize error document pages. 1. For Apache server, add the ...


9

For your first two rewrites (non-www → www, http → https), the following rule should work: RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} !=www.example.com [NC] RewriteRule ^(.*) https://www.example.com/$1 [NS,L,R=permanent] Just replace www.example.com with the actual canonical hostname of your site. As for your third ...


7

Working just within the browser, I couldn't tell if a particular direction was due to DNS or the webserver. To view webserver redirects in browsers, open up Developer Tools (either from the browser's menu, or by pressing F12), and click on the Network tab. It's a good idea to look for a Disable Cache option and check this so that all requests are done ...


6

I wouldn't count on all spiders being able to follow a redirect to get to a robots.txt file. See: Does Google respect a redirect header for robots.txt to a different file name? Assuming you are hosted on an Apache server, you could use mod_rewrite from your .htaccess file to to serve the correct file for the correct domain: RewriteEngine On RewriteCond ...


6

You do not want to do a 301 redirect to a 404 page. The 404 HTTP response tells the user-agent (browser, search engine, etc) that the requested document cannot be found. If you send a 301 HTTP response then they will think the document has moved to the new location which is your 404 page. That is not accurate. When you encounter a page not found send the ...


5

Use a 302 redirect instead 301 302 Redirect Means: http://en.wikipedia.org/wiki/HTTP_302 - "The HTTP/1.0 specification (RFC 1945) defines this code, and gives it the description phrase "Moved Temporarily"." However that doesn't mean you'll be able to keep your search engine placement. It just specifies that the content is moving for a set amount of time ...


5

Although the browser should cache permanent redirects, I think an internal rewrite would be preferable. This avoids the browser having to make an additional HTTP request: RewriteEngine On RewriteRule ^([a-z]+\.css)$ /css/$1 [L]


5

It seems like you're aiming for the second-worst outcome. If you're expecting a spike, you have time to do something: Implement in-code caching (can be easy, can take a while to get right) Optimise static files (jpegoptim, optipng, more-css, etc) to reduce bandwidth, speed things up for all users. Move your static stuff to a CDN to remove those requests ...


5

I changed the DNS so it's the same as my website Does this mean your website is now displaying on their domain? If so undo this ASAP, as this will create a duplicate of your site, which could have na adverse effect on your sites ranking. You should 301 redirect their domain to your domain. Where possible redirect pages on their site to relevant pages ...


4

Do a 301 redirect from the parked domain to the new domain. That will tell the search engines that the existing domain is the main one and will eliminate potential duplicate content issues. It will also be less confusing for your users as they will see a consistent domain when accessing your site. If you are using Apache you can do this easily with a ...


4

While this should work, it has a few potential drawbacks: Every crawler has to do two HTTP requests: one to discover the redirect, and another one to actually fetch the file. Some crawlers might not handle the 301 response for robots.txt correctly; there's nothing in the original robots.txt specification that says anything about redirects, so presumably ...


4

The redirect is the better solution, as it stops the erroneous URLs ever being linked to or shared, and so should help crawl efficiency (i.e., search engines shouldn't have to crawl multiple non-canonical versions of pages, thereby wasting time that could be spent elsewhere on your site). I'd do your redirects on the server though, if possible. A fairly ...


4

You could just redirect /styles.css to /css/styles.css. In the .htaccess in the web root: RedirectMatch permanent /([a-z]+\.css)$ http://example.com/css/$1 (Replacing example.com with your real domain name.)


4

There are no SEO issues with this. When you think about it there is no standard home page URL. No only do different web servers have different default (index.html, default.html, etc) but it's not uncommon for home pages to be in subdirectories (example.com/site/something/home). Search engines are not going to have any difficulty recognizing it as your ...


4

First find out if their url shortening service uses 301 redirects, if they don't, use another service. If you stay with them, add GA tracking parameters to your urls. You could create some "fancy" parameters values that perfectly identify visits that are coming through their service. After adding parameters sent them your urls. With those parameters in place ...


4

From an SEO standpoint, moving from a keyword domain to a company branded domain is a good move. The 2014 SearchMetrics Ranking Factors found that that having keywords in the domain name is no longer a significant ranking factor. I consider hyphens in domain names to be bad for rankings as well. Moving to company branded domain name is a good move for ...


4

What webserver are you running on? Nginx To remove www in nginx do the following. if ($host = 'www.example.com' ) { rewrite ^/(.*)$ http://example.com/$1 permanent; } That will strip the www. To force https: rewrite ^ https://$server_name$request_uri? permanent; Along those lines. Apache Force https: RewriteEngine On RewriteCond %{HTTPS} ...


4

Actually I just found an answer to my own question addressed in the relevant RFC 7230 (or its predecessor RFC 2616), e.g. in the description of status code "303 See Other": Except for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the ...


4

Use this. It should save you from two headaches. RewriteEngine On RewriteCond %{HTTP_PORT} 80 [OR] RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ https://example.com/$1 [R=301,L] this also allows any URL that starts with http://www.example.com/ or that connects to port 80 (the standard web port) to redirect to https://example.com/


3

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.


3

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


3

You do not need a custom error document in order to monitor 404's on your site - if that is the requirement. All the information is in your server access log. The HTTP response code (ie. 404, 403, 200, etc) and the URL of the request that produced that response. The custom error document is a nice way of serving a meaningful response to users. You can also ...


3

I do not believe so. Not using ErrorDocument the way you have specified. Here is a resource site that seems to have some answers. http://www.askapache.com/htaccess/htaccess.html#Custom_ErrorDocuments Scroll down and you will find this example. If it is not exactly what you want, it can be modified. ### ALTERNATATIVE TO USING ERRORDOCUMENT # ...


3

Since the rule is only rewriting the URL, it should return a standard '200' HTTP header code (assuming there are no other errors). If you had used a redirect action type instead of rewrite, then you would have received a 301 or 302 HTTP response code depending on how the rule was configured. There are a variety of tools available that you can install on ...


3

Your syntax for Redirect is wrong. The first URL should be relative The second URL should be abolute Try this instead: Redirect 301 /gigs http://example.com/booking/


3

Google Webmaster Tools change of address tool is only for sites that move to a whole new domain name. It doesn't cover cases such as: Moving from HTTP to HTTPS (or the other way around) Moving a subdirectory or subdomain to its own domain name Consolidating several sites into one Changing URLs within a site The reason that the tool exists is that new ...


3

HTTPS/HTTP is a protocol and technically are not classed as a new site You do not need to inform Google Webmaster Tools that your site has moved, this is because HTTPS and HTTP are protocols and not are not treated the same as say changing domain or sub domain. You can even see when adding a site to webmaster tools it doesn't even ask for a protocol: ...


3

Google has a site migration howto. A protocol change counts as url modification; this is the relevant section. The switch goes much like a regular HTTPS switch. Once your urls are made protocol-relative, and before you start redirecting, you should validate the https site in Google's webmaster tools. It's a separate site with its own sitemap. There is no ...



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