How do you redirect a subdomain and mask the URL?

I'm able to redirect a subdomain to a different folder on the server but need to mask it as well so it doesn't show as "subdomain.domain.com/folder" but rather "subdomain.domain.com".

Here's what I'm using for the redirect:
RewriteCond %{REQUEST_URI} ^/folder1 [NC]
RewriteRule .* subdomain1.co.luxury [P,L]

Any solution or ideas are appreciated.
Thanks,
Eric

change DirectoryIndex file for subdomain

I want two languages on my website – one french-specific website, and one in english for broader purposes (and no automatic translation). For maintenance reasons, I’d like to not duplicate images and CSS, … I also set up subdomains for language variants – for now both point to the www folder of my domain.

So I have two “index.htm” and “index_fr.htm” files, and a “fr” subdomain.

I’ve read up a bit about htaccess, and I’d like to set one up so that DirectoryIndex index_fr.htm is triggered when accessed through the subdomain.

Is it feasible? does it make sense? and how?

Is the _acme-challenge subdomain protected?

I was looking into the DNS-01 challenge of Let’s Encrypt; and I had a question about the sub domain process [1].

Let’s say, the website example.com gives away free subdomains; what stops me to request a Let’s Encrypt wildcard certificate for *.example.com, by claiming the _acme-challenge.example.com subdomain to process the DNS-01 challenge?

Is there anything in the ACME protocol (or anything else) that stops me from doing this?

[1] = https://letsencrypt.org/docs/challenge-types/#dns-01-challenge

Google Search Console: Separate Subdomain Property from Top Level Property

I’m working with a website and there’s a subdomain which I don’t have access to.

In Google Search Console, the “Property” consists of the entire domain, including this subdomain. (It’s all part of 1 Property).

The subdomain is handled by a different part of the company — and it has a bazillion issues which show up in Google Search Console for the domain as a whole.

I’d like to separate these two domains into two different Search Console properties so that the top level site doesn’t “see” the errors from the subdomain. And I’d like the subdomain to be its own property in Search Console.

(Also I’m a little afraid that the poor quality subdomain may be impacting the search performance of the top level domain? I’m not sure about this).

What I’ve done so far:

I used “Add Property” to add the subdomain to Search Console. That part was easy enough.

Now I have a listing for the top level domain and the subdomain.

What I want to do next

Is there a way to tell Search Console to then ‘ignore’ the subdomain from the main, top-level Search Console property?

Effectively this would give me two totally different Search Console properties. One for the top-level (minus the subdomain) and one for the subdomain.

Is this possible?

Use a domain, sub-domain or sub-folder for adding a physical location to an existing content website?

We currently have a global photography website located at https://phmuseum.com. We will be adding a physical location, school/events space in Bologna, Italy this year. We will be targeting the services this physical location mainly to local Italians but also a lesser extent Europeans and Globally.

We will create a microsite for bookings and promoting this space in Italian and English.

What would the best route to take in terms of targeting and SEO to add this website to our current offering? As I see it there are a few options or a combination of the following:

  • Sub-folder: https://phmuseum.com/space (/en & /it)
  • Sub-domain: https://space.phmuseum.com (/en & /it)
  • Domain: https://phmuseumspace.com (/en & /it)
  • Domains: https://phmuseumspace.it (local) && https://phmuseumspace.com (global) (Hreflang)

We could even go hyperlocal with https://phmuseumspace.bo.it

Any thoughts, recommendations or suggestions would be welcome.

Setting NS for Subdomain to Another Hosted Zone with Same Apex Domain

Suppose I own example.com.

I delegate the subdomain www.example.com to a particular set of NS that is say a Route53 Hosted Zone. The rest of the example.com zone is not on R53 and contains important information for other subdomain/records. You can consider this Zone 1, and you can consider the new R53 Hosted Zone as Zone 2.

I want to have www.example.com CNAMEd to a particular endpoint, say a cloudfront distribution. Since I can’t CNAME the apex domain, instead hosted zone 2 is created in R53 with the original apex domain: example.com. Then, inside that hosted zone, there is a record for the subdomain www.example.com with the CNAME to xxx.cloudfront.net.

I can’t directly configure www.example.com with the CNAME in hosted zone 1 for various reasons, including that the CNAME is always changing and the person controlling the CNAME only has control over zone 2.

So the full chain looks like this: User types in www.example.com, they get NS hosted 1 records. In that zone, the record for www.example.com points to Hosted zone 2 records. In this zone (which was created with apex example.com) the record for www.example.com is a CNAME to the proper endpoint.

My question: will any DNS resolvers mistakenly cache the NS from the second zone as apex domain records? Obviously, I want those NS accessed only for the www.example.com records. If example.com NS records are mistakenly thought of as in hosted zone 2, there can be a lot of issues.

If this is the case, is there any way to make sure to DNS resolvers that the apex domain nameservers are zone 1, and zone 2 records are ONLY for www.example.com, even though they were created with the example.com apex domain?

I understand that there are other ways to do this (CNAME to separate domain, etc) but for logistical purposes (for now) I am only interested in setting the NS directly for the www subdomain.

How do I point a subdomain to a different nameserver use Google Domains?

I discovered this question: Can I use different nameservers for different subdomains?

And I tried it out using Google domains.

I currently have a site hosted with AWS. However, I’d like to use Siteground to host a subdomain.

How can I do this through Google domains? According to the answer I posted, you just have to update an NS record on Google domains with the desired subdomain name and the nameserver. However, I tried this and it is not working.

For example, in Google domains I’m using 5 AWS nameservers:

ns2.aws.org ns3.aws.org ns4.aws.org ns5.aws.org 

and in the custom resource records section, I have a NS record set up like this:

Name    Type    TTL     Data dev     NS      5m      ns1.siteground.us                         ns2.siteground.us 

On siteground, I have a WordPress site installed on the dev.mysite.com domain

What else do I need to do to make it work?

No Client Hello w/ SNI when accessing website’s subdomain via link

I noticed this while testing SNI-based HTTPS filtering for fun.

mail.yahoo.com is blocked when accessed directly. It is not blocked if you login to your Yahoo account and access mail.yahoo.com via the “Mail” link. I ran a packet capture and see there are no Client Hello messages with the mail.yahoo.com name in the SNI extension field when I click the “Mail” link.

My assumption is that the client is somehow re-using the same connection since the *.yahoo.com certificate is valid for both domains. Anybody with some deeper knowledge of TLS able to clarify what’s going on or able to point me in direction of some documentation?

Also, if that’s the case, then why does Chrome send a Client Hello w/ Google subdomains when attempting similar tests via accounts.google.com?

NOTE: I’m blocking UDP/80 and UDP/443, so QUIC should not be influencing my results. Also, I use deep inspection in my day-to-day, so please no responses telling me to stop using SNI-filtering.

Redirect all subdomains from one root, to the equivalent subdomain of another root?

I have foo.com and bar.com

I want sub.foo.com to redirect (not be aliased with) sub.bar.com, same for asdf.foo.com and asdf.bar.com, etc, for all sub domains.

I know I can redirect all subdomains of foo.com to a particular subdomain of bar.com (e.g. sub.foo.com & asdf.foo.com both go to www.bar.com) using a wildcard DNS record, but I am not aware of how to maintain the requested subdomain name and apply it with the redirect.

Is this even possible?