31

A CNAME is a type of DNS record, where a hostname points at another hostname. An A record is another type of DNS record, where a hostname points at an IP address. A subdomain is what you described as 'the left side of the domain', e.g. webmasters.stackexchange.com is a subdomain of stackexchange.com. The DNS setup for a subdomain could use either an A ...


18

2007: Here what Google's Matt Cutts has to say about sub-domains vs folders: My personal preference on subdomains vs. subdirectories is that I usually prefer the convenience of subdirectories for most of my content. A subdomain can be useful to separate out content that is completely different. Google uses subdomains for distinct products such news.google....


14

You're right that the trick is a wildcard DNS entry (indicated with asterisk) . Essentially it's a DNS entry that will match all subdomains that don't have a specific DNS entry. Then the "routing" happens on the application/website side. There is no actual DNS entry created for the subdomain, the reason that it finds a "match" when a DNS request is made, is ...


13

Yes, You can. you will have to add the NS records for the subdomain in the DNS Manager for your TLD (Top Level Domain). For Example: In DNS Manager for TLD add NS records Like. bla.example.com. 1799 IN NS ns1.subhosting.org. bla.example.com. 1799 IN NS ns3.subhosting.org. bla.example.com. 1799 IN NS ns2.subhosting.org.


13

You can serve a different robots.txt file based on the subdomain through which the site has been accessed. One way of doing this on Apache is by internally rewriting the URL using mod_rewrite in .htaccess. Something like: RewriteEngine On RewriteCond %{HTTP_HOST} !^(www\.)?example\.com$ [NC] RewriteRule ^robots\.txt$ robots-disallow.txt [L] The above ...


13

Indeed you can. For instance some do not realize a www. url is an actual sub-domain. So it is happening all the time. You can go to your server settings and choose your sub-domain as the main domain name or add some code to create a redirect. Many people use Apache servers for hosting websites and when you have used a domain name with traffic to it, a ...


11

Generally, you have to use a separate sitemap for each host (i.e., different protocol, domain, or subdomain): From the FAQ "Where do I place my Sitemap?": All URLs listed in the Sitemap must reside on the same host as the Sitemap. For instance, if the Sitemap is located at http://www.example.com/sitemap.xml, it can't include URLs from http://...


9

After receiving clarification on this from John Mueller at Google, disavowing a root domain will also disavow all other sub domains under it. For example, disavowing:- domain:example.com Will also disavow:- sub23.example.com sub4646.example.com www.example.com You can of course, disavow individual sub domains like domain:sub23.example.com though which ...


8

The subdomain is nothing else than a DNS record applied to the root domain. If you consider the root domain example.com, any of the following is a valid subdomain www.example.com foo.example.com foo.bar.example.com and even *.example.com *.foo.example.com Then way you create subdomains is creating a DNS record for them, regardless it's a single-level ...


8

As per Matt Cutts blog post, he said: A subdomain can be useful to separate out content that is completely different. Google uses subdomains for distinct products such news.google.com or maps.google.com, for example. This is similar to what Blogger (blogspot) does. John's blog (john.blogspot.com) is totally different from Doe's blog (doe.blogspot....


7

You can remove the sub-domains in webmaster tools, but first you need to add the sub domains as seperate sites and then submit a site removal. They should be gone within a day or so. See these instructions for removing a site from google : https://support.google.com/webmasters/answer/1663427?hl=en


7

Google's bots will still want to request /robots.txt from your sub domain and not /robots_static.txt which would have no meaning to them. RewriteCond %{HTTP_HOST} ^www\.static\..*$ [NC] RewriteRule ^/robots\.txt$ /robots_static.txt [L] When requests for /robots.txt are made from your www.static domain the /robots_static.txt file will be served up as if it ...


7

It's possible exactly the same way that unix.stackexchange.com itself is possible. DNS does not impose any specific hierarchy, like "subdomain – domain – toplevel", you can add as many labels as you need, and add delegations at any level. (Take "www.theregister.co.uk" for example. Is "theregister.co.uk" a domain or a subdomain? It's both.) In other words, ...


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


7

The error you are receiving is because CNAME's only support domain names and not URL paths. You can setup a redirect using your hosting account or Cloudflare Page Rules. 14 Step Cloudflare Process in redirecting traffic from subdomain to main domain using Page Rules: Login to Cloudflare Use the drop-down menu in the upper left of your screen and click ...


6

Yes, this is definitely possible. But please note that, by convention, www.domain.com is just an alias for domain.com. So, what you describe is not at all standard and violates most users' expectations. It also runs at least some risk of search engine penalties. So, in my opinion, it is not a good idea, but yes, it's possible. Exactly how you do it depends ...


6

will browsers recognize individual files as being the same as pre-cached ones, if they are served from different subdomains? No. Two identical files served from different locations are different files as far as the browser (cache) is concerned. The URL is the key by which the file is cached by the browser. As media1, media2 etc all serve the same files, ...


6

This is normal behavior. I am not sure what your question is exactly. But here goes. I am going to assume you are using Apache and host your DNS. Create the sub-domain on your server however you need. For Apache, this would be almost exactly like any other domains website. You can find the configuration files in /etc/apache2/sites-available or /etc/local/...


6

You display companies information on your site, you need to use one website as a companies directory, it's logical. Option 1 Using a subdomain for each company seems complicated to maintain in the future... Moreover for SEO, you don't give all the value to your website but a little value to many websites (subdomains are treated as different websites for ...


6

To start, I've never really found a hard and fast "best" answer here in terms of which setup will help you the most with Google. I've gone both routes and been able to get sites ranking in Google either way. You can be penalized for keyword stuffing (and other reasons) no matter what direction you go. Now, that said, in general, if you are looking at what ...


5

For GoDaddy, forwarding is redirecting every single URL on a domain to another domain using 301 redirects. This is a free service (or at least included at no extra charge with domain registration). With forwarding here are some examples of what happens: http://example.com/ 301 redirects to http://myrealdomain.tld/ http://example.com/page.html 301 ...


5

You have a problem with the nameserver (NS) records for beiruthub.com. $ dig NS beiruthub.com ;; ANSWER SECTION: beiruthub.com. 1800 IN NS dns1.m6.net. beiruthub.com. 1800 IN NS dns2.m6.net. beiruthub.com. 1800 IN NS dns3.m6.net. beiruthub.com. 1800 IN NS ns01.domaincontrol.com. beiruthub.com. 1800 IN NS ...


5

Setup both the domain and the subdomain in google webmastertools, and set your preferred version to be the subdomain one, then in the 'naked' domain (mydomainsite.com) if you are using apache, put this in the .htaccess (mydomainsite.com/.htaccess) RewriteEngine On RewriteCond %{HTTP_HOST} !^subdir\.mydomainsite\.com$ [NC] RewriteRule ^(.*)$ http://subdir\....


5

Google will automatically treat subdomains as part of the main site when: They have related content They are written by the same person or company They link to each other From Vanessa Fox, an ex-Google employee: Google is no longer treating subdomains (blog.widgets.com versus widgets.com) independently, instead attaching some association between them. ...


5

Yes. Whatever the web root for the subdomain is where you would put a robots.txt for that subdomain's contents. It will not affect the root domain and the root domain's robots.txt will not affect the subdomain.


5

I would recommended either using the www or non-www and stick with it. Set a preferred URL in Webmaster Tools and then 301 to either your www or non-www. The reason for this would be Google would see both the non-www and www sites as two separate websites. If the content is exactly the same, then you could be penalized with duplicate content.


5

The subdomain is certainly the easiest option since you are wanting to host the site on another server. The reason for this is that a hostname can only ever resolve to a single location. If you are worried about SEO from the changed URLs, you could perhaps consider a redirect to the subdomain instead. However, since you are specifically looking to avoid the ...


5

If I am reading the RFC correctly, labels (the parts in between the dots) in a domain name cannot be empty because the empty label is reserved: Each node has a label, which is zero to 63 octets in length. [...] One label is reserved, and that is the null (i.e., zero length) label used for the root. RFC 1034 In other words, the "null label" is ...


5

www.give.example.com is exactly like give.example.com in the DNS, but they are separate names, so once you put a record for give.example.com that says nothing for www.give.example.com (except in cases of delegations, which is not the case here). So you need records for both, such as in your zonefile (or equivalent in any provider UI or API): give A 192.0.2....


5

This type of indirection is called a reverse proxy setup. To reverse proxy in Apache2, use the ProxyPass directive in your config for www.example.com: ProxyPass "/" "http://name.example.com/supercool-landing-page" To reverse proxy in nginx, use the proxy_pass directive in your config for www.example.com: location / { proxy_pass http:...


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