301 Redirect from ASP.NET to PHP...Is it possible?
-
Hi all,
I'm trying to migrate my current website over to wordpress however my current website is ASP.NET and obviously Wordpress uses PHP.
Is it possible to perform a 301 redirect from a asp.net to a php?
Or do you need to convert the asp.net language into php?
Or something different?
I welcome your thoughts?
Regards,
Thomas Rochford
-
Yes that's correct, or even on the same hosting account
-
Many thanks guys, I think I get what your saying.
From what I understand I could just do this...
I build up a new wordpress website on a different hosting account. Within the .htaccess file I create my 301's. Then once I point the domain from the old hosting and website to my new one everything should work fine?
Again many thanks for your help.
-
Hello Thomas,
sorry for my late answer.
As Alan was saying, the web server intercepts a request before it serves a page. If it finds a rule that redirects that request, there is no need for the files to exist. So you would manage the rules for the request that you want to redirect on the same server where the old domain is located. If you are redirecting to the same domain, then yes, this means the rule will be on the same server that manages that domain. When somebody looks for your page, then the DNS would point to your server's IP. After that, the request is sent to that IP and the web server will try to serve whatever is needed for that request. But if you successfully add a rule for that specific request (let's say "www.mydomain.com/page1") to be sent to another URL (let's say "www.mydomain.com/newpage"), then the server will redirect that request.
-
Yes.
you don't need both sets of files.
before the request reaches your pages, it is intercepted by the webserver and checks for any 301 rules. if it finds one for that url it will redirect, even if neither of the files exist. this all happens early in the request life cycle.
But as I said before, make things easy for yourself, only 301 the pages that had external links
-
Hi guys,
Thanks for replying. Wondered however how you would get both the files to sit on the same hosting?
I know that windows can take both PHP and ASP.NET but I have heard that windows hosting for WordPress is not as straight forward as Linux. Is it still possible to perform 301 redirects for both sets of files in Linux?
Regards,
Tom
-
I would find any pages that's have external links, and only 301 them, as there is no use 301'ing pages that have no external links, you can 301 any url you want, the language is not relevant.
What server are you on IIS(Microsoft) or Apache? For Apache then use .htaccess for iis use web.config
Me myself I would not be moving to WordPress, you will end up with many more crawling problems
-
Hello Thomas,
I did not code ASP.NET, but from my understanding, a 301 redirect does not need to be connected to the language you write code in. You could perform a 301 redirect from your web server for example (in Apache you could use the htaccess file).
Anyways, I think you should redirect from your asp.net file to php and everything will work ok. You can check the link below for some code examples I have found searching on Google.
http://www.webconfs.com/how-to-redirect-a-webpage.php
http://www.beyondink.com/howtos/301-redirect.php
Hopefully this helps!
Cristian
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
-
301 redirect hops from non-https and www
It's best practice to minimize the amount of 301 redirect hops. Ideally only one redirect hop. It's also best practice to 301 redirect (or at least canonical) your non-https and/or your non-www (or www) to the canonical protocol/subdomain. The simplest (and possibly the most common) way to implement canonical protocol/subdomain redirects is through a load balancer or before your app processes the request. Both of which will just blanket 301 to the canonical domain/protocol regardless if the path exists or not In which case, you could have: Two hops. i.e. hop #1 http://example.com/foo to https://example.com/foo, hop #2 https://example.com/foo to https://example.com/bar 301 to a 404. Let's say https://example.com/dog never existed, but somebody for whatever reason linked to it (maybe a typo). If I request https://www.example.com/dog, the load balancer would 301 to a 404 page. Either scenario above should be fairly rare. However, you can't control how people link to you. Should I care about either above scenario? I could have my app attempt to check if the page exists before forwarding, but that code could be complicated.
Intermediate & Advanced SEO | | dsbud0 -
301 redirecting to anchor points
A client has just given me a list of redirect URLs as requested of them. However, they're wanting to redirect a bunch of pages to various anchor points within the same page. For example: /pages/about might redirect to: /pages/our-story#our-mission And: /pages/history might redirect to: /pages/our-story#history Is there any problem with this? I've never seen or been asked to redirect like this before.
Intermediate & Advanced SEO | | muzzmoz0 -
Hundreds of 301 Redirects. Remove Pages or Not?
Hi Mozers, I have a website that has literally got hundreds of 301 redirects. I had a close look at these URLs and only some of them have backlinks to it and remaining all of them are not indexing in Google and has got not backlinks at all. Based on what I have noticed experts mentioning, loads of 301 redirects can potentially slow down the site speed. In a case like the website I have, should I completely take off the pages from website to reduce the number of 301 redirects or should I leave 301 redirects? There is no traffic or backlinks coming from these URLs. Malika
Intermediate & Advanced SEO | | Malika10 -
Is it ok to 301 redirect this previously algorithmicly penalised site?
Hi All, Is it OK to 301 redirect site A to site B? Site A: http://goo.gl/P9Zp2y Site B: http://goo.gl/ySDCzb The story - in 2013 site a seemed to be penalised with some kind of anchor text algorithm penalty - SEO couldnt fix, so created site B and turned site A into a holding page with a no follow link to new site. SEO company worked on disavow file etc, implemented in late 2013 301 redirect site A to B in late 2013 - SEO advised to stop 301 about 8 weeks later... This was my fault i didnt realise the implications of a redirect... Stopped the redirect, but too late, as site B dropped in rankings in early 2014 - new disavow files uploaded to both sites, but damage seems done now. No longer have a SEO company, and i would ideally like to 301 redirect site A to B, as it looks messy having a holding page - but wanted to check if SEO would still strongly advise against that? please advise James
Intermediate & Advanced SEO | | isntworkdull0 -
Is it possible to avoid redirect of penalties for 301 forwards?
We have been doing a good amount of competitive research lately and have noticed sites that have been changing their TTLD quite often to escape manual penalties / DCMA filings. An example evolution: brandterm.com -> brandterm.bz -> brandterm.me These competitors are able to quickly rank for money keywords in the top 3 soon after another domain switch. What we have noticed is that while its obvious they received Google penalties they continue to 301 redirect the old domains to the new ones. We have experienced first hand that penalties travel along domains with 301 redirects. Does anyone have an explanation how these companies are able to achieve quickly high volume of organic search while 301-redirecting from burnt domains? The only option I see is to disavow all previous domains in GWT to be able to employ 301 redirects without risking carrying over the penalty. Are there other theories ppl can think of? T
Intermediate & Advanced SEO | | petersocapro0 -
Redesign Launch with change from ASP to PHP
My client is launching a new corporate website redesign. But the trick is, their old site was built in ASP and they want the new site to be a Wordpress site, built in PHP. Their current website has A PR4/10 and MANY backlinks to its pages. I don't want to risk any SEO authority and make sure the transition is smooth. The current site only has less than 75 pages. Can anyone give me a checklist of things I need to make sure get done? And how to do each? For example: 1. How to forward the old domain to new URLs... (301s? DNS? HT Access?..not savvy) 2. Keep all the same URLs? 3. Don't change any content?...etc. 4. Submit new sitemap? or robots.txt file? Also, I wanted to add a Wordpress Blog to the new site for SEO purposes, but since it's being built in Wordpress, do you recommend I have a subdomain on this site as www.blog.website.com? Or is this now not necessary since the entire thing is built in wordpress? I would REALLY appreciate your time helping me on this. Thanks! Derek
Intermediate & Advanced SEO | | DerekM880 -
SEOMOZ found basically all my articles and says they need a 301 redirect ?
Hope someone can HELP. So my site looks like it has the proper 301 redirect to www. for the main domain. But for some reason my articles that have a /trackback on them redirect to same address with out the trackback at the end. How do i fix this? seomoz is saying all my articles need a 301 redirect .all like 100. Thanks any help would be great
Intermediate & Advanced SEO | | jstgobig0 -
Regarding 301 Redirect!
Hello, I heard that 301 redirect can be good for newly registered domain names can i buy a old domain name and put 301 redirect on it to my newly registered niche market domain name. Shall i buy only 1 domain name and put 301 redirect to my newly registered domain names or i can do this for more than 1 old domains i purchased?
Intermediate & Advanced SEO | | anand20100