Forum Moderators: phranque
How Can i submit subdomain.mywebsite.com to searchengine? will it be dulicate conent error ?
We do not "submit" URLs to search engines much any more, because it is not necessary. Instead, all that is needed is one (or a few) links from other known URLs to the new URL. Search engines will then find those links, and crawl the new URL.
I assume that what you are doing is rewriting the requested URL <username>.example.com to the filepath /user.php, and perhaps passing the username to user.php as a query string. No client redirects should be used.
You will not have a duplicate content problem unless the URLs like sam.example.com and bob.example.com return the same (or very similar) content. Any URLs that *do* return the same content will be considered duplicates and probably won't ever rank very well. Consider telling the search engines not to crawl them or not to index these duplicates by using robots.txt or the on-page HTML <meta name="robots" content="noindex"> directive.
Jim
The subdomain names are same as username and are generated dynamically upon user registration. when user x registers,the sudomain domain name x.example.com redirects to a php page in public_html (www.example.com/user.php) which shows his content. There is not any subfolder being created for subdomain. So where can I store the sitemap.xml n robot.txt of subdomain ?
Sure you can generate anything you like: robot.txt, sitemap.xml, labels.rdf, w3c/p3p.xml -- whatever. All you need is to rewrite all such requests to a script that knows how to generate those files... :)
I hope you have taken advantage of our site search feature here. There are dozens if not hundreds of previous threads on implementing multiple and per-user subdomains.
Jim
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteCond %{HTTP_HOST} ^([^.]+)\.(www\.)?example\.com
RewriteRule (.*) user.php?slug=%1 [L]
</IfModule>
and my wildcard domain named * points to root directory.
The url user.example.com always remain on the adress bar.
I would like to know what changes do I need to make in .htaccess inorder to make sudomain, sitemap n robot.txt dynamical ? can the subdoins subfolder be created inside Public_html ?