Questions tagged [subdomain]

Subdomain is a domain which is a part of a larger domain. For example, 'sub.example.com' is subdomain of 'example.com' domain.

5761 questions
55
votes
2 answers

Why use subdomains to designate tenants in a multi-tenant web application?

Questions Why do some multi-tenant web applications use subdomains to designate the tenant while others do not? Are there technical, privacy, or security reasons? Is it dependent on the language or framework used to develop the web application?…
Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
55
votes
3 answers

Domain IP address for www and non-www for Canonical URL

To handle Canonical URL is it best practice to do a 301 redirect or better to have the same IP Address for both www and non www domain? For example: Canonical URL/domain wanted is http://example.com Domain | A…
Wasabi Developer
  • 3,523
  • 6
  • 36
  • 60
53
votes
17 answers

Public Wildcard Domain Name To Resolve To 127.0.0.1

Is anyone aware of a public wildcard domain name that resolves to IP address 127.0.0.1. For example if I wanted to test a URL locally such as mywebsite.localhost.com or example.localhost.com but I don't have control of DNS settings (hosts file or…
user189422
51
votes
10 answers

subdomain vs. subdirectory in web programming

There are two main strategies for handling multiple "applications" on the web: subdomains (e.g. wiki.example.org, blog.example.org, admin.example.org, api.example.org/v1) subdirs (e.g. example.org/wiki, example.org/blog, example.org/admin,…
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
50
votes
1 answer

How do I get my computer's fully qualified domain name in Python?

I know I can use platform.node() to get my computer's network name: >>> import platform >>> platform.node() 'MyComputerName' But what I really want is something that will work similar to the following: >>>…
Jace Browning
  • 11,699
  • 10
  • 66
  • 90
47
votes
1 answer

Subdomain of website for Github pages project

I have a Github project, github.com/jeti/matrix, and I set up a "Github pages" site for the project so that it is accessible here jeti.github.io/matrix/. That is all configurable through Github. Now, I would like to add a subdomain of my personal…
bremen_matt
  • 6,902
  • 7
  • 42
  • 90
47
votes
2 answers

How do I make a custom subdomain on Firebase?

I have purchased a domain ("www.mydomain.com"). How do I make a subdomain on Firebase ("sub.mydomain.com"), if I am using Firebase hosting?
Doug Liu
  • 471
  • 1
  • 4
  • 4
45
votes
4 answers

How to test nginx subdomains on localhost

I want to test nginx subdomains before uploading config to the server. Can i test it on localhost? I try server { listen 80; server_name localhost; location / { proxy_pass http://localhost:8080; } } server { …
madhead
  • 31,729
  • 16
  • 153
  • 201
44
votes
1 answer

Can subdomain.example.com set a cookie that can be read by example.com?

I simply cannot believe this is quite so hard to determine. Even having read the RFCs, it's not clear to me if a server at subdomain.example.com can set a cookie that can be read by example.com. subdomain.example.com can set a cookie whose Domain…
Christophe
  • 2,052
  • 1
  • 19
  • 24
41
votes
4 answers

Heroku + node.js: I have a server which uses multiple ports. How can I get Heroku to allocate them?

Umm I'll try to be more clear.. In an application server I have written in node.js, I have inner-proxy for multiple ports: in my 8080 port I have my rest api. in my 3000 port I have my push server and chat. I use the npm package subdomain-router…
Amit Evron
  • 913
  • 1
  • 7
  • 12
39
votes
7 answers

Regular Expression - Extract subdomain & domain

I'm trying to form a regular expression (javascript/node.js) which will extract the sub-domain & domain part from any given URL. This is what I ended up with: [^(?:http:\/\/|www\.|https:\/\/)]([^\/]+) Right now, I'm just considering http, https for…
sunilkumarba
  • 851
  • 2
  • 9
  • 18
39
votes
2 answers

Dynamic Subdomain Handling in a Web App (Flask)

I'm going to be using flask to create a web application, and part of the application will involve a subdomain (for example, user1.appname.org). I'm not sure how to go about creating these subdomains dynamically in the flask configuration, or how to…
Bruce Collie
  • 501
  • 1
  • 5
  • 4
38
votes
7 answers

Why ww2 sub domains?

I have seen on the web some domain names having prefix of ww2 or ww3 or so (ww2.somedomain.example, ww3.yourdomain.example). And these happen mostly when traveling from a page to page. What would be the reason of having such subdomains? Is there…
Nirmal
  • 9,391
  • 11
  • 57
  • 81
38
votes
3 answers

Does a session cookie on different subdomain count as 3rd-party?

Suppose I have a site at www.example.com which has an IFRAME pointing to ASP.NET site myapp.othersite.com - this causes issues with session and 3rd-party cookies which I understand. If I moved the embedded app to myapp.example.com, would the session…
RossJ
  • 555
  • 1
  • 4
  • 9
37
votes
9 answers

Javascript Redirect with Google Analytics

I need help figuring out how to successfully redirect while including Analytics code. I have a subdomain setup http://buuf.fractalsystems.org The subdomain is actually just a subfolder http://fractalsystems.org/buuf I have an HTML file in that…
TryTryAgain
  • 7,632
  • 11
  • 46
  • 82