What is the part of a URL before the domain name called? - html

So I have 2 questions:
What is this part called? en.wikipedia.org, the part before the domain name.
I wanted to make something like that for my website, like firstName.lastName.web
For my personal page on my family web site.
How do I do that? I know that if I just put a folder in the root folder, its treated as a /. Like so: lastName.web/firstName.HTML. That's fine, but not what I wanted.

It's called a subdomain. Creating a subdomain varies on who you have your domain name registered to. A quick google search should be able to solve this for you.

In DNS it may be considered a sub-domain - in general this position is the hostname.
In your example this isn't even a hostname - it's just the language prepended.
Like this translations of multilanguage sites get separated ('en' is quite the default).
Usually this is all the same virtual host - just with different language resources.
Just create a sub-domain called *.yourdomain.com to enable wildcard DNS.

Nowhere did I see this spelled out in layman's terms, so here goes.
I own a bunch of domain names, and here's one that is parked, right now: violetweedconsulting.com.
The DOMAIN NAME is violetweedconsulting.com, that is also the 'root domain', it includes the TLD extension.
The ".com" is the TLD extension of that example domain name.
Some other potential TLD extensions are ".edu", ".org", ".net", ".ca" (for canadian domains) and of course TODAY there are a lot more TLD extensions, but primarily, for most uses, those basi ones are all you'll use in the USA.(UK has co.uk, and Australia has co.au, etc.)
Subdomain: The 'www' that comes just before the domainname.com is an example of a 'subdomain', or 'third level (the 'period' . is a separator character).
If you are a newbie, think of the 'www' as a file folder name. If you had a website, you could be (though not always) an 'administrator' for that website on your hoster's website. Then you'd have a login to, for example, www.godaddy.com and you would thus have a login to godaddy's hosting area for your website. On that hosting site you'd have the ability to add different 'folders' like 'search' or 'blog'. The search folder might have a search-engine page (I wouldn't bother with that folder but some sites do, if they have a lot of data, for example). The 'blog' folder would be where your blog posts would go, and you can also redirect a wordpress.com (or .org) or a blogger.com to the subdomain blog.domainname.com, so that you can use the subdomain 'www.domainname.com' for whatever you want and the blog subdomain just for your journaling. There's more info available, but that's the gist of it. www is a filefolder, so is blog., etc. and each subdomain can be 'restricted' to specific users with logins, etc.

That part is called the subdomain.
More generally speaking, here are the different parts of a URL, as per window.location. (So at least according to how Javascript calls it)
protocol://username:password#hostname:port/pathname?search#hash
-----------------------------href------------------------------
-----host----
----------- origin -------------
protocol - protocol scheme of the URL, including the final ':'
hostname - domain name
port - port number
pathname - /pathname
search - ?parameters
hash - #fragment_identifier
username - username specified before the domain name
password - password specified before the domain name
href - the entire URL
origin - protocol://hostname:port
host - hostname:port

Related

How http and https relate to sitemap and site sources?

I am new in web development / SEO and stucked so hard on next moment:
We got sitemap file for helping SE robots index our pages correctly.
Sitemap could contain only URLs from current sitemap directory. For example: http://www.example.com/sitemap.xml can contain only links, whose exist in same catalog. But how data transfer protocols (http/https) relate to my finite directory, if it is just a way for transfer data? I have not two different folders with sources on my web server for http and https, lol. And indexing should not changing with protocol changes in URL. Same question i got for www subdomen. I know what a problem in my missunderstanding in web basics xD
Clients (such as search engine indexing bots and browsers) make HTTP requests to servers, which provide a response.
A URL is how a specific resource is located. It will specify the scheme/protocol, hostname, and path (and optionally a few other things).
A URL might specify HTTP or HTTPS (the latter adding an encryption layer).
The hostname portion of a URL might include www in the name or it might not.
When the server receives the request it will run some code to determine how to respond to it. A common and simple approach for that code is to match the path portion of the URL to part of the directory structure of the file system of the computer running the HTTP server software. It may, or may not, use different directories as the root for this depending on the hostname and protocol.
This means that you might have an HTTP server providing both HTTP and HTTPS and mapping www.example.com and example.com onto the same directory resulting in (at least) four different URLs all mapping onto any given file.
Best practise is to pick one of those as the canonical URL (with preference given to HTTPS and various arguments for with or without the www (which mostly revolve around convenience and how cookies for the primary hostname will be handled on other subdomains).
When writing absolute URLs (e.g. in sitemaps, emails and business cards), use the canonical URL.
It is generally recommended that the server be configured to issue 301 Redirects from the non-canonical URLs to the canonical equivalent.

Which robots.txt for forwarded subdomain?

In theory I have two subdomains set up in my hosting:
subdomain1.mydomain.com
subdomain2.mydomain.com
subdomain2 has a CNAME record pointing to an external service.
mydomain.com has a robots.txt that allows indexing everything.
subdomain2.mydomain.com has a robots.txt that allows indexing nothing due to the CNAME record.
If I set up a forward from subdomain1.mydomain.com to subdomain2.mydomain.com, which robots.txt would be used if accessing a link to subdomain1.mydomain.com? Does the domain forward work in the same way as a CNAME record when it comes to robots.txt?
This depends on your server setup.
Take the following config, for example:
server {
server_name subdomainA.example.com;
listen 80;
return 302 http://subdomainB.example.com$request_uri;
}
In this case, we're redirecting everything from subdomainA.example.com to subdomainB.example.com. This will include your robots.txt file.
However, if your configuration is set up to only redirect certain parts, your robots.txt file will only be redirected if it's on your list. This would be the case if you were redirecting only, say, /someFolder.
Note that if you don't return a 302 but just use a different root (e.g. subdomainA and subdomainB are different subdomains but serve the same content), your robots.txt content will be determined by the root directory.
So, therefore, if I'm understanding your config correctly, subdomain1 will use the the robots.txt from subdomain2.
The challenge you're running into is you're looking at things from the standpoint of whatever software you're trying to configure, but search engines and other robots only see the document they load from a URL (just like any other user with a web browser would). That is, search engines will try to load http://subdomain1.mydomain.com/robots.txt and http://subdomain2.mydomain.com/robots.txt, and it's up to you (through configuring whatever software your server is running) to ensure that those are in fact serving what you want.
A CNAME is just a way to add a redirection when loading what IP a browser should look at to resolve a domain name. A robot will use it when resolving the name to find out the "real" IP to connect to, but it doesn't have any further bearing on what the GET /robots.txt request does once it connects to the server.
In terms of "forwarding", that term can mean different things, so you'd need to know what a browser or robot would receive when it requested the page. If it's doing a 301 or 302 redirection to send the client to another URL, you'll probably get different results from different search engines on how they may honor that, particularly if it's being redirected to an entirely different domain. I probably would try to avoid it, just because a lot of robots are poorly written. Some search engines have tools to help you determine how their crawlers are reading your robots.txt URLs, such as Google's tool.

Wordpress - ftp'd site/exported database to localhost, localhost images still point to .com, why?

I FTP'd over the entire wordpress site and exported the Database and got it running on my localhost throught WAMP, but for some reason the links and folder are still pointing towards it's .com, and a 404 error comes up as well.
I suspect it has something to do with .htaccess but I'm not sure.. Can someone steer me in the right direction?
Did you update WordPress Address (URL) and Site Address (URL) under General > Settings?
They might still point to old domain.
Transferring the site over FTP to your local machine is the same as "moving" it to a new domain. Wordpress provides specific instructions for such a move which you can find #
http://codex.wordpress.org/Moving_WordPress
When Your Domain Name or URLs Change
When your domain name or URLs change - i.e. from http://example.com/blog to http://example.com, or http://example.com to http://newexample.com - there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display.
If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked. When this changes, things break. To avoid that serialization issue, you have two options:
Only perform a search and replace on the wp_posts table.
Use the Search and Replace for WordPress Databases Script to safely change all instances. ( If you are a developer, use this option. It is a one step process as opposed to the 15-step procedure below )

difference between http and www

pardon me for asking a very basic doubt.
I have hosted a page in the site collinfo.annauniv.edu
The page opens fine when i enter the address as http://collinfo.annauniv.edu
But when i gave www.collinfo.annauniv.edu my browser shows 404 error.
What is the difference that http causes here in place of www.
The www. before your domain is actually a subdomain. It's essentially the same thing as help.microsoft.com or orders.amazon.com.
With that in mind, there are a few things that could be happening:
1) Your DNS records do not include the appropriate A Record for the www subdomain.
In this case, you'll need to setup an A record that points to your web site's IP address. If you don't know how to do this, your web host should be able to help.
2) Your server is not configured to handle the www subdomain.
If you're using the apache web server, it needs to be configured to show your web site when the user enters www before your domain. Again, your web host can set this up for you.
It all comes down to a misconfiguration issue. If you don't have experience administering web servers, you may want to give your web host a holler.
www comes from the (rather) old time where a domain had several sub-features, of which the web was not always the main service. For instance
www.domain.tld for web
mail.domain.tld for mail
ftp.domain.tld for ftp
domain.tld for web
but this is a convention - any subdomain may point to anything actually.
This is more a question of DNS declaration and/or web-server configuration ; in this case it is probably that the web-server configuration does not trigger the same pages for www.domain and domain (since you get a 404).
The author / administrator of collinfo.annauniv.edu either forgot to create a DNS entry for www.collinfo.annauniv.edu or did not create a virtual domain (web-server side) for it that would point to the same pages as collinfo.annauniv.edu.
HTTP is a protocol.
http://collinfo.annauniv.edu
Is the address of a resource which can be retrieved using HTTP.
annauniv.edu is the domain in your case.
collinfo is the subdomain.
www.collinfo is also considered as a subdomain but it does not exist. That's why you get HTTP 404 not found.
Subdomain can be anything, www is usually used as it usually mean World Wide Web.
WWW is a subdomain
HTTP is a protocol (language)
Whether you specify HTTP in the browser or not, the browser will always assume the request is being of "http" type and will ussually add http:// for you.
WWW however is just an alternative subdivision of the domain name, the same as in:
www.domain.com
site.domain.com
sub1.domain.com
sub2.domain.com
.....
etc.domain.com
In most cases the WWW subdomain will point to the same "page" as the main domain, which is usually called the "index" page, such as index.html, or index.php and in most cases the index page is hidden in the browser's address bar, unless you specifically type it in, such as http://www.yahoo.com/index.html, but you have to understand that if you have a full control of your webserver you can modify these, so WWW doesn't point to the same page or you can call you main page "home.html" instead of "index.html" and instruct your webserver to "point" your browswer to that page by default.
But things like HTTP are not easily changed, since HTTP is the main language of the web and most browswers use that as the primary means to access the webservers.
Peace!

Subdomains do not work without the leading www

What is the difference between the following URLs?
http://www.forums.example.com and
http://forums.example.com ?
Actually I've created a new subdomain in my website and it's working fine when I try to access without www (i.e http://forums.example.com) But when I try to give URL like http://www.forums.example.com it is showing "Page not found".
Why is this and how can I fix the issue?
If I am not mistaken, www. is also considerd a Subdomain, hence when you setup hosting on a provider (i.e Slicehost) they tell you to put www in the subdomain list (again if I am not mistaken). If you really want www.fourms.duckyetc you can set up a script to do some matching, i.e
if url contains www.fourms.ducketc then go to here else go somewhereelse
You have to create a cname for www.forums.duckyvideos.com and also configure your webserver to respond to that cname. There is nothing automatic about www prefixes on the web. It's just a convention that websites are accessible with or without the www. Everyone hosting a website has to explicitly set up a second cname for the www prefixed version of every site they put up.