Tag Info

Hot answers tagged

7

You most certainly do not have to buy store.xyz.com as a new domain name. store.xyz.com is a part of xyz.com A domain name is made up of multiple parts www.google.com www.google.com | | | --- domain name extension | | --- domain name | --- subdomain mail.google.com mail.google.com | | | --- domain name extension | | --- ...


4

You could make a very simple test to see if there is www in the URL, and if it hasn't, go to the www version via a 301 permanently moved header: if( substr($_SERVER['HTTP_HOST'],0,4)!='www.'){ header('Location: http://www.'$_SERVER['HTTP_HOST'].'/'.$_SERVER['REQUEST_URI'], true, 301); } Don't forget to set your canonical tags to www so bots know your ...


4

It isn't necessarily bad for SEO. You want to be careful of "sneaky redirects" (see https://support.google.com/webmasters/answer/2721217?hl=en), but this type of behavior should probably fall in acceptable territory. Honestly, from an SEO perspective, you'd be better off redirecting the broken URL to a legit page on your site via a 301 server side redirect. ...


3

From a SEO perspective, using a subdomain, www, splits up visits to the site though you can combine the data into one number. Some companies want to forgo the www since it just takes up space in advertising and is useless in a sense. Having a www, just to have one, is pointless and, should I say, old fashioned. However, unless there is a technical reason or ...


3

If the redirects are temporal, this is fine. If the old domain should be disregarded and the new domain should be used, this is bad. As long as there's 302, the bots will periodically check the first domain and keep those in the results. If you 301 them, you tell them "forgot old url, only use new url". This last part is not happening now.


3

The software 'WebsitePanel' does not allow you to make subdomains of a subdomain. You could use a sub-domain to create a new web site, but you cannot create another sub-domain based on it. From http://www.websitepanel.net/documentation/users-guide/domains/#ManagingSub-Domains


2

The approach of using a wildcard DNS record is probably the correct one for your use case. When you configure a wildcard DNS record, all requests to any subdomain will be resolved to the IP address of your webserver. You can then further process the request on your webserver. This approach is known as Virtual Hosting. Your webserver will decide which ...


2

The canonical URL should be the URL you want Google to show in their search results. So: http://www.somewebsite.com/product-category/12/this-is-my-product-name/


2

You are right! It is tradition to have the www and therefore expected by many. Tradition that is many decades old should not be easily discarded. At the very least, you may not be capturing the traffic that expects the www. Normally, I would say that you need to choose one or the other, www or non-www, but both should exist with one redirecting to the ...


2

The easiest ways to do a redirect in order from the old-fashioned method to the best method is as follows: Code snippet 1 saved as index.html in the document root of the old URL. <html> <head> <title>Redirecting</title> <meta http-equiv="refresh" content="1;URL=http://store.xyz.com"> </head> <body> ...


1

How can I still throw the 503 server error on the new server Using whatever server-side scripting language you are using. For example, in PHP this would be something like: header('HTTP/1.1 503 Service Unavailable',true,503); Note that if you are serving a (temporary) 503 then it is advisable to also send a Retry-After header with the time the service ...


1

For worldwide compatibility, the answer is no. The reason is because not everyone can read messages very quickly, and depending on the contents of your error page, it might take someone with poor eyesight at least a few good minutes to read everything on it. Also, there's a chance that the person using the site has a poor understanding of the language the ...


1

If you do it after something like 10 seconds or more, it should be fine. It would imply that the user was not already there and just get confused but actually (as many do) opened the search result in a new tab and took them in turn until they got to yours. So a 404 page will get them to close it right away, while a redirect may give them something more ...


1

You are half way there. I would suggest that any page that does not exist should error out. I have a "removed" page that issues a 404 and any page that is deleted would 301 redirect any deleted page to the "removed" page. But in the end, I found that it was far better if the page I deleted would 404 without the 301. I changed this a bit, and please know ...


1

You can't really use naked domains with cloud hosting environments like Google AppEngine, because the IP addresses may change at any time so you have to use a CNAME, which you can't do with a naked domain. Some providers have DNS workarounds if you use their own DNS, and Google may do that.


1

www. is an automatic alias. (See http://www.chickenaday.appspot.com/ vs http://chickenaday.appspot.com/). Why force the user? If you do want to redirect, you could try this untested snippet of slightly modified code from http://stackoverflow.com/a/10964868/3164117: from urlparse import urlparse, urlunparse @app.before_request def redirect_nonwww(): ...



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