DNS, Domains, Multi-Tenancy, Django focus ------
- DNS server level Tips and Tricks
- Web Server - Apache, NGINX Domain Tips and Tricks
DNS server level Tips and Tricks
A-names, C-names. Mail Records WTF?
The A-name is simply the dns server map to an IP address. It tells the entire Internet where to find that domain's web server.
@ => this is the ROOT yourdomain.tld. You will need to create a record for @ host additionally if needed. Also, if a separate subdomain is created, it has a higher priority than wildcard.
Catch-all (wildcard) subdomain? If you want a browser to be able to get to your site no matter what subdomain they requested (www.yourdomain.tld or even anyname.yourdomain.tld) without having set up specific directories or symlinks for those requests in advance, then you can use a catch-all subdomain to redirect their request for a non-existent, mistyped or random subdomain to a valid page on your website. NOTE: A wildcard DNS record does not cover a root domain (e.g., yourdomain.tld),
A-names - map DNS to static IP
- eg in cloudfare mapping a DNS A-name to a physical Static IP v4 will in a few minutes (could take longer to propagate) now map XYZ.com to that address
- A name - XYZ.COM - 22.214.171.124
URL Redirect (also referred to as URL Forwarding) is a technique which is used to redirect your domain's visitors to a different URL. You can forward your domain name to any website, webpage, etc. which is available online. SRC
Page A ----> Page B
Redirects use status codes defined within the HTTP protocol. URL forwarding may be of the following types
1. 301 (permanent) - Unmasked - SEO friendly
It should be used if your website was permanently moved to the new address and you want it to be indexed by search engines (all traffic and existing SEO value will be routed to the destination URL). It is considered to be the most efficient and search engine-friendly method for webpage redirection.
You've moved your site to a new domain, and you want to make the transition as seamless as possible.
People access your site through several different URLs. If, for example, your home page can be reached in multiple ways - for instance, via http://example.com/home, http://home.example.com, http://www.example.com or https://www.example.com - it's a good idea to pick one of those URLs as your preferred (canonical) destination and use 301 redirects to send traffic from the other URLs to your preferred URL.
You're merging two websites and want to make sure that links to outdated URLs are redirected to the correct pages.
2. 302 (temporary) URL Redirects - Unmasked
It should be used if a certain URL has been changed to a different address temporarily. Search engines will index the original URL and not the destination URL and display the original URL in search results, eg
When there is Page A maintenance, you want to temporarily redirect visitors to a temporary Page B.
When it is important for you to keep URL A indexed (benefit from eg SEO rankings) but redirect users to some other page for actual use.
For example if you have popular SEO-ranked landing pages like "Top in Category XYZ" - but you want the actual content page to switch around, if the URL changes it would kill the SEO rating. But by keeping the SEO-friendly page but only doing TEMPORARY 302 redirects, you can now switch the actual URL seen to the page YOU want to promote, while retaining legacy SEO-friendly links.
You are promoting (eg paid ads) links to URL A while content for some reason is currently located at URL B.
3. URL Frame (URL masked or URL cloaked redirect).
Instead of redirecting the client to your web page, the web page is displayed in a frame from the server. With this method, the visitor's browser will display your domain name (for example, www.mydomain.com) and some other person’s website.
URL Frame is bad for SEO as it creates duplicate pages in search engines. The problem with domain masking is that it creates duplicate content in search engines. Google and other search engines will identify your domains and masked ones as duplicates and decide to serve one over the other; and sometimes, it’s not always the one you want. In short, it is not possible to have a search engine presence for two domains showing the same content.
Not all the web server host settings allow masking. It is possible to prevent URL masking at the hosting server level, so if your domain is giving Forbidden or other similar errors, then most likely, such measures are enabled at the target server side.
SEO matters - dynamic IP and Redirects can kill rankings!
Moving a page from one URL to another even with 301s, the search engines will take some time to discover the 301, recognize it and credit the new page with the rankings and trust of its predecessor. This process can be lengthier if search engine spiders rarely visit the given web page, or if the new URL doesn't properly resolve.
If you use dynamic IP - this can really hurt
Subdomains mappings and Wildcard Subdomains for Catch-all Redirects
- To set this up, go to Domain Dashboard > Select a domain > Manage
Typically there is a section - Redirect Domain section Source url Destination url
yourdomain.com http://sites.google.com Edit Delete <-- Note: this comes from A-name URL Redirect under @ -> URL/IP Wildcard Redirect http://sites.google.com Edit Delete
Click on the Add Wildcard Redirect button if there no current wildcard redirect.
You can set the wildcard subdomain that lets you forward all subdomains that have not been created to a page on your website or to any other page on the Web.