If you are asking the question, “What is in the URL?” then you should be new to SEO. If you want your website to be identified correctly then it should meet the web standards. It should be a canonical URL. Unlike human users, web servers make a lot of distinctions with regard to how domain names are presented. Let us consider the following illustration.
Let us consider the following URLs:
When you type the above URLs and hit the enter button, you should not be surprised if you see a different page for each of these links. For us all these URLs are referring to the homepage of the website. But for search engines and servers all of them refer a different entity. The servers try to pick the best match for these URLs when they return the results or when they open the webpage.
If you don’t pay attention to details then you may be driving traffic to a page which you really don’t want people to see. Sometimes web designers while designing websites put in the trial pages or demo pages on the server, if we are not careful you might be driving traffic to these demo page which can ruin your reputation online.
If you want the search engines to reach the right page or the right URL, you need to be consistent throughout your site. If you use mysite.com in one place try to stick to it all through your site if that is where you need your traffic. If you use www.mysite.com in one place then maintain that through out the site. So that your ranking will not be shared between the above two URLs watering down the effectiveness of your SEO efforts.
Besides being consistent you can also try to use permanent 301 redirects to ensure that you get traffic to the right page. We might be consistent through out the site but we don’t have control over how people are to type the URL when they want to access your website. So if you want people to reach www.mysite.com then you need to set a permanent redirect so that when people use mysite.com they will reach www.mysite.com automatically. If the nature of your website should demand that, it changes often then it is best to use a 301 redirect so that you can be sure that all the visitors are routed through the proper page. It would also help if you have dynamic pages in your site.
On the other hand if you need just a temporary redirect for some reason then do not use 301 redirect. Some of the webmasters use 301 redirects when they want a temporary redirect with an intention to remove the redirect when they don’t need a redirect anymore. This will lead to problems later when you remove the redirect. For temporary redirect you just need to use 302 redirects.