WebsiteGear Logo Log In
New User? Sign Up
About | Contact | FAQ
  Home Content Web Hosting Wednesday, August 23, 2017 
Print| Email| Save| Discuss| Feeds


Tips On Using SubDomain
Published: Sunday, March 14, 2004


Points to consider before using subdomains
Subdomain makes the URLs shorter and nicer. It allows website owners to categorize the content of the website. It also
helps in improving the search engine rankings as most of the search engines treat the subdomain as a separate website address. However, there are certain things to consider before setting up subdomains for your website.
  1. Many web hosting providers do not provide subdomains in their hosting packages. If you have subdomain and want to move your site, you have to choose one which supports subdomains.


  2. Most web hosts charge extra for subdomain setup and maintenance.


  3. If you use cookies in your website, a cookie set from a subdomain cannot be read from the main domain and vice versa because of the security association feature tied to the domain which set it. This is also true for session cookies, where, if the user is logged in on the main site, and then moves to a subdomain, the subdomain site will not be able to access the same session cookie, and will assign a new session (hence forcing the user
    to login again). However, session persistence across subdomains can be maintained by implementing URL rewriting instead of session cookies.


  4. Your website stats will often not include the statistics of the subdomains. Therefore, you have to setup separate statistics for your subdomains.


  5. One of the advantages of using subdomain is that the website can be broken down into smaller pieces without losing the brand image associated with the domain name. The subdomains can be hosted on separate servers in order to reduce the burden on the main domain hosting server.

Sharing cookies among all subdomains
As explained earlier, cookies are not shared among subdomains or between the domain and the subdomain. In order to set cookies accessible by all subdomains, use the following techniques:
  1. While writing the cookie, set the cookie domain to ".domain.ext" so that it applies to all subdomains.


  2. If the cookie domain is set to ".domain.ext", it will not be accessible by a user who types in the address without the www before the domain (i.e. http://domain.ext). Therefore, redirect all requests without www to http://www.domain.ext.
There are some reported problems with the above approach. It is safe to set the default cookie with no domain specified and then set another one with domain as ".domain.ext". In this case there is no need for the redirects.
However, remember that session cookies are set by the web server software and you may not have control over how the cookie domain is set.
Previous Article SubDomain - The Third Level Domain Subdomain Configuration Next Article
Print| Email| Save| Discuss| Feeds
RELATED ARTICLES
Nav SubDomain - The Third Level Domain
A subdomain is the part of the website address before the domain name. Learn about using subdomain names.
Nav How To Sell A Website
If you have an existing website or domain name you no longer need and wish to sell, this article will explain the steps you need to take to ensure a quick, easy, profitable sale.
Nav Website Revenue - An Introduction
Does your website make money? There are billions of websites on the internet. About 30 million domain names are registered. But among these, how many of the websites do make money?
RELATED NEWS
News Post IBS Software Inks Multi-Year Contract With Jin Air
SEOUL, South Korea, August 23, 2017 /PRNewswire/ -- -IBS' iFly Res will power the passenger reservation of the Korean ai...
News Post Global Domain Names Industry
NEW YORK, Aug. 22, 2017 /PRNewswire/ -- This report analyzes the worldwide markets for Domain Names in Thousands by the follo...
News Post Q2 2017 Akamai State Of The Internet / Security Report Analyzes Re-Emergence Of PBot Malware; Domain Generation Algorithms; Relationship Between Mirai Command & Control And Attack Targets
Report also highlights web application and DDoS attack statistics
News Post GoDaddy Enhances Online Security Offerings For Small Businesses With TrustedSite
GoDaddy Domains and SSL now offer McAfee SECURE, giving customers the best in trusted online experiences
News Post Global Bakery Products Industry
NEW YORK, Aug. 22, 2017 /PRNewswire/ -- This report analyzes the worldwide markets for Bakery Products in US$ by the followin...
Submit News | View More NewsView more news
RELATED CLASSIFIED ADS
Classified Ad Cheap Domain Registration
Looking for cheap private domain registration and cheap web hosting plans? BallisticDomains is a lea ...
Classified Ad Domain Registration and Web Hosting
We provide the best price for domain registration and web hosting. Domain name price like .com Rs.55 ...
Classified Ad Domain Registration and Web Hosting
We provide the best price for domain registration and web hosting. Domain name price like .com Rs.55 ...
Classified Ad DOMAIN FOR CAVA WINE
On offer the domain CAVA.PINK parked and sold at SEDO marketplace. Safe buy, all included. CAVA = CH ...
Classified Ad .RS Domain Registration - Accredited registrar
Serbian domain names are registered in the following domain name spaces: .rs domain can be regist ...
Post Free Ad | View More View more classifieds
RELATED FORUM POSTS
Forum Post Redirect Domain to new subsite
My apologies if this is a dumb question: We have 20 location sites on their own domains (with th ...
Forum Post Strange problem with domain name configuration
We have a few domain names registered with Network solutions. Recently, we changed web hosts. In t ...
Forum Post Parent servers say that the domain does not exist
I have a certain question related to DNS configuration: 1) a week ago my internet domain SKARBIEC ...
Forum Post DNS Records For Google Apps For Your Domain ERROR
I'm trying to use Google Apps for Your Domain, and have pointed webearce.com.ar to editDNS ser ...
Forum Post problems with forward and reverse lookup tables
Hi guys, I'm working as beginner IT in a new company. One of the first things they ask me to do ...
Add New Post | View More View more forum posts
POPULAR ARTICLES
Nav How To Sell A Website
Nav Subdomain Configuration - How To Setup A Sub Domain
Nav Domain Configuration - How To Setup A Domain Name
Nav Website Layout - Tips & Tricks
Nav Round Robin DNS Load Balancing
Nav Introduction To Server Load Balancing
Nav Website Traffic & Revenue
Nav Tips On Using SubDomain
FEATURED NEWS | POPULAR NEWS
View More News View More News