Forum Moderators: phranque

Message Too Old, No Replies

submit wildcard subdomain name to search engine

submit wildcard subdomain name to search engine

         

rahul_c

10:25 am on Aug 13, 2009 (gmt 0)

10+ Year Member



I have created a subdomain named * using cpnale and set the document root to public_html. Now subdomain.mywebsite.com redirects to php page of [mywebsite.com...] using mod_rewrite. The php then shows the respective content depending upon the subdomain name.

How Can i submit subdomain.mywebsite.com to searchengine? will it be dulicate conent error ?

jdMorgan

1:51 pm on Aug 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Search engines do not crawl pages or sites or domains, they crawl URLs. URLs are the "things" that search engines deal with.

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

rahul_c

6:30 pm on Aug 13, 2009 (gmt 0)

10+ Year Member



Thanks jim for that explanation.
So Now all that I need to do is, place the subdomain url in sitemap/xml which is currently inside(Public_html)

but will www.example.com/sitemap.xml be able to access the subdomain name username.example.com ?

Can adding the url's to sitemap be done dynamicaly?

jdMorgan

6:34 pm on Aug 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Each subdomain must have its own sitemap.xml and robots.txt file. It is almost (but not quite) considered to be a separate domain.

Jim

rahul_c

6:54 pm on Aug 13, 2009 (gmt 0)

10+ Year Member



Can sitemap and robot.txt also be genrated dynamically for each wild card subdomain?

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 ?

jdMorgan

9:33 pm on Aug 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Again, I hope you're not redirecting, as that is not a good way to implement per-user subdomains. Use an internal rewrite, so that the URL is always user.example.com. YOu can then internally rewrite that to any filepath you like, but user.example.com should always be what appears in the browser address bar.

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

rahul_c

10:05 pm on Aug 13, 2009 (gmt 0)

10+ Year Member



I am using modrewite ,my .htaccess conatins

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

jdMorgan

10:55 pm on Aug 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) Write a script that outputs sitemaps for each subdomain.
2) Add a rule like this ahead of your existing rule.

RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteCond %{HTTP_HOST} ^([^.]+)\.(www\.)?example\.com
RewriteRule ^sitemap\.xml$ script_that_outputs_sitemaps.php?subdomain=%1 [L]

Jim