DNS vs IIS redirection
-
I'm working on a project where a site has gone through a rebrand and is therefore also moving to a new domain name. Some pages have been merged on the new site so it's not a lift and shift job and so I'm writing up a redirect plan.
Their IT dept have asked if we want redirects done by DNS redirect or IIS redirect. Which one will allow us to have redirects on a page level and not a domain level?
I think IIS may be the right route but would love your thoughts on this please.
-
If you are not changing the IP address you don't need to change the DNS, if you change the IP address, in addition to updating the DNS records you also need to properly redirect traffic from old urls to new urls.
With IIS the best option is using url rewrite, which is very flexible but a little tricky to set up if it's the first time you do so: http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module
Url rewrite does operate at web server level, its powerful and does the job, but you may consider doing redirects at application level, depending on the technology you use, php/dotnet/aspx/mvc you have different tools. The advantage of doing it at application level is you can redirect dynamically, in other words use an algo to translate the old urls to the new ones using whatever information is stored in the application cache, database, and so on. While using IIS url rewrite you either statically redirect each old url to a the new url or you use regular expressions or wildcards to dynamically do so. In other words using url rewrite you have a little less flexibility.
-
Within IIS you use the IIS Manager. Here's a blog on page-by-page: http://www.proworks.com/blog/2010/02/11/adding-a-301-redirect-in-iis-for-individual-pages-with-non-aspx-extensions/ It's older but still applicable.
There's also software available like ISAPI_rewrite that can help with the process if you're migrating between Apache and Windows servers: http://www.helicontech.com/isapi_rewrite
The Windows doc on this: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6b855a7a-0884-4508-ba95-079f38c77017.mspx?mfr=true
-
Thank you very much. What file would manage page by page or directory by directory redirects on an IIS server?
-
It sounds like you're talking about CNAME vs a 301 redirect.
DNS can't really "redirect", at least in the SEO sense. A CNAME DNS entry acts as a pointer to another site. Sooner or later you have to have an A record to act as the "glue" between yourdomain.com and an IP where it can be accessed. The problem is that yourdomain.com is the end result. So even if it is just a CNAME for loadbalancer.abc.some.cloud.com, it will be seen as yourdomain.com by both the browser and any robots that visit.
A 301 redirect is an actual instruction (HTTP response code) from the web server (IIS in your case) to the end browser, saying that yourdomain.com really belongs over at anotherdomain.com. At that point your browser (or crawling robot) goes to the new domain. This is considered the proper SEO way to redirect anything, as it is known that robots respect the 301 response and most SEO benefits that the previous link had will flow through the 301 to your new page.
-
Hi
If I understand them correctly....
DNS change would be the location for site x is now at this IP. (IP Location Change)
IIS change would be server y is now server x. (Hardware Location Change)
In which case an IIS change would likely be preferred as you don't have to wait for the new DNS update to propagate.
Hope that helps,
Don
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Is this a correct use of 302 redirects?
Hi all, here is the situation. A website I'm working on has a small percentage of almost empty pages. Those pages are filled "dynamically" and could have new content in the future, so, instead of 404ing them, we automatically noindex them when they're empty and remove the noindex once they have content again. The problem is that, due to technical issues we can't solve at the moment, some internal links (and URLs listed in sitemaps) to almost empty pages remain live also when pages are noindexed. In order not to waste Google crawler's time, sending it to noindexed pages through those links, someone suggested us to redirect those pages to our homepage with a 302 (not a 301 since they could become indexable again, so it can't be a permanent redirect). We did that, but after some weeks Search Console reported an increase in soft 404s: we checked it and it is 100% related to the 302 implementation. The questions are: is this a correct use of 302 redirects? Is there a better solution we haven't thought about? Maybe is it better to remove 302s and go back to the past situation, since linking to noindexed pages isn't such a big problem? Thank you so much!
Technical SEO | | GabrieleToninelli0 -
Redirect typo domains
Hi, What's the "correct" way of redirecting typo domains? DNS A record goes to the same ip address as the correct domain name Then 301 redirects for each typo domain in the .htaccess Subdomains on typo urls still redirect to www or should they redirect to the subdomain on the correct url in case the subdomain exists?
Technical SEO | | kuchenchef0 -
.htaccess Redirect 301 issues
I have completely rewritten my web site, adding structure to the file directories. Subsequently added was Redirect information within the .htaccess file. The following example ...
Technical SEO | | Cyberace
Redirect 301 /armaflex.html http://www.just-insulation.com/002-brands/armaflex.html
Returns this response in the URL bar of ...
http://www.just-insulation.com/002-brands/armaflex.html?file=armaflex
I am at a loss to understand why the suffix "?file=armaflex" is added The following code is inserted at the top of the file ...
RewriteEngine On redirect html pages to the root domain RewriteRule ^index.html$ / [NC,R,L] Force www. prefix in URLs and redirect non-www to www RewriteCond %{http_host} ^just-insulation.com [NC]
RewriteRule ^(.*)$ http://www.just-insulation.com/ [R=301,NC] Any advice would be most welcome.0 -
DNS error on webmaster tool
Google webmaster tool is showing DNS error and that is leading to many server error (502,500) almost 50+ in every crawl. Recently Google crawled one of our sub domains that we did not want google to crawl. We blocked it via Robots.txt and also removed all the URL's and since then we are having this issue. Any suggestions how to fix this DNS error? Thanks in advance.
Technical SEO | | tpt.com0 -
Server Vs Authority
Deciding on whether to go for a Sub directory or CC tld structure. So the tradeoff would be one server location (which can affect local rankings if the server is outside the country) VS a better passing of link authority. What factor is more important?
Technical SEO | | Tourman0 -
Redirects 301
Hello, I need to reedirect a URL of a page that I have in my site (http://digitaldiscovery.com.pt/servicos-de-marketing-digital/publicidade-online/) to a new URL with SEO porpuses. Whats the best way to this? I use Wordpress btw. Tks in advance! PP
Technical SEO | | PedroM0 -
Google Webmaster redirect vs 301 redirect
OK assuming a client's website has the right tracking script (hopefully analytics isn't effected by this issue), ... what happens if the htaccess file has a 301 redirect to the www-address, but within Google Webmaster Tools, the address chosen to crawl by Google is the non-www address? How will Google handle and which address takes precedence in this situation? _Cindy
Technical SEO | | CeCeBar0 -
301-redirect
Hi My website is fairly new and i wasnt aware of the difference btw 'website.com' and 'www.website.com' when i started up. It doesnt matter which one i use as long as i am consistent right ? Most of my ingoing links are to mainpage on 'website.com'. I have som ingoing links to 'www.website.com' but also some to 'www.website.com/brandname'. is it enough to 301-redir 'www.website.com' to 'website.com' or does it need to be done on several levels ? I need to have someone do the redirect for me - how can i check its working when its done ? Dan Lærum
Technical SEO | | danlae0